GithubHelp home page GithubHelp logo

goldwaterkk / deepssv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jingmeng-bioinformatics/deepssv

0.0 0.0 0.0 16.13 MB

Detecting somatic small variants in paired tumor and normal sequencing data with convolutional neural network

License: GNU General Public License v3.0

Python 100.00%

deepssv's Introduction

DeepSSV: detecting somatic small variants in paired tumor and normal sequencing data with convolutional neural network

DeepSSV takes as input a mixed pileup file generated by samtools from tumor and normal BAM files. It first operates on each genomic site independently to identify candidate somatic sites. Next it encodes the mapping information that are readily available in the pileup format file around the candidate somatic sites into an array. Each array is a spatial representation of mapping information adapted for convolutional architecture. Then the convolutional neural network (CNN) model trained on experimentally validated somatic events evaluates the information in these arrays to obtain additional support for true positives and filter false positive predictions. Finally, potential somatic small variants determined by the CNN model are generated in the variant call format (VCF).

DeepSSV was tested on ubuntu 16.04 LTS and requires Python 3.

Prerequisites:

TensorFlow 1.8.0

Please see https://www.tensorflow.org/install/install_linux for how to install TensorFlow.

pandas 0.23.3

xphyle 3.1.6

Getting started

  1. Run samtools (tested version: 1.8) to convert tumor and normal BAM files to a mixed pileup file required by DeepSSV:

     samtools mpileup -B -d 100 -f /path/to/ref.fasta [-l] [-r] -q 10 -O -s -a /path/to/tumor.bam /path/to/normal.bam | bgzip > /path/to/mixed_pileup_file
    

Note: For the case of applying DeepSSV on a part of the whole genome, increase the BED entry by n (the number of flanking genomic sites to the left or right of the candidate somatic site) base pairs in each direction, and specify the genomic region via the option -l or -r.

  1. Run identi_candi_sites.py to identify candidate somatic small variants from the mixed pileup file:

     identi_candi_sites.py
     --Tumor_Normal_mpileup /path/to/mixed_pileup_file
     --Candidate_somatic_sites /path/to/candidate_sites
    
  2. Run mapping_infor_candi_sites.py to create a file with mapping information for candidate somatic small variant sites as input for trained CNN model, or to create a file with mapping information for validated somatic sites for training or fine-tuning the CNN model:

     mapping_infor_candi_sites.py
     --Candidate_validated_somatic_sites /path/to/candidate_validated_sites
     --Tumor_Normal_mpileup /path/to/mixed_pileup_file
     --Mapping_information_file /path/to/mapping_infor_file
     --indicator training or inference
     --length read length
    
  3. Run model_train.py or model_fine_tune.py to train or fine-tune a CNN model:

     model_train.py
     --Mapping_information_file_train /path/to/mapping_infor_file_training
     --Mapping_information_file_validate /path/to/mapping_infor_file_validation
     --saved_model_path /path/to/save/trained_models
     
     model_fine_tune.py
     --checkpoint_file /path/to/trained_models
     --Mapping_information_file_fine_tune /path/to/mapping_infor_file_fine-tuning
     --Mapping_information_file_validate /path/to/mapping_infor_file_validation
     --saved_model_path /path/to/save/fine-tuned_models
    
  4. Run model_infer.py to predict somatic small variants:

     model_infer.py
     --checkpoint_file /path/to/trained_CNN_model
     --Mapping_information_file_inference /path/to/mapping_infor_file_infer
     --vcf_file /path/to/vcf_file
     --pred_class /path/to/pred_class
     --Candidate_somatic_sites /path/to/candidate_sites
    
  5. Create the validated_sites file required by mapping_infor_candi_sites.py to generate a file with mapping information for training or fine-tuning the CNN model:

     validated_sites.py
     --Tumor_Normal_mpileup /path/to/mixed_pileup_file
     --mpileup_index /path/to/mpileup_index
     --Validated_labels /path/to/Validated_labels
     --Validated_somatic_sites /path/to/validated_sites
    

    Example of the Validated_labels file for validated sites with labels (1: somatic site, 0: non-somatic site):

     chr1    790265  0
     chr1    1595272 1
     chr1    2312314 1
     chr1    5006153 0   
    

Please help us improve DeepSSV by reporting bugs or ideas on how to make things better. You can submit an issue or send me an email.

Jing Meng

[email protected]

deepssv's People

Contributors

jingmeng-bioinformatics avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.