Skip to content

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

License

Notifications You must be signed in to change notification settings

jingmeng-bioinformatics/DeepSSV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

jing.mengrabbit@outlook.com

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages