Difference between revisions of "2016-VAT VMT"

From Statistical Genetics Courses

Jump to: navigation, search
(Created page with "===VMT=== ################################## # Example 1: Autosomal recessive # ################################## vtools init VMT --force vtools import AR1.vcf.gz AR2....")
(No difference)

Revision as of 13:23, 15 September 2016

VMT

##################################
# Example 1: Autosomal recessive #
##################################

vtools init VMT --force
vtools import AR1.vcf.gz AR2.vcf.gz --format NSHI.fmt --build hg19 -j8
vtools show tables
vtools show samples
vtools execute ANNOVAR geneanno
vtools use dbNSFP.DB
vtools use refGene
vtools show fields
vtools select variant "(ExAC_AF is NULL or ExAC_AF<0.0005) AND (ExAC_SAS_AF is NULL or ExAC_SAS_AF<0.0005)"  -t  ExAC0005
vtools select ExAC0005 "CADD_phred>20 or CADD_phred is NULL" -t CADD20
vtools select CADD20 "region_type is 'splicing' OR (mut_type is not NULL AND mut_type is not 'synonymous SNV' AND mut_type is not 'unknown')" -t ANNOVARtype
vtools select ANNOVARtype "dbNSFP.chr is not null" --output chr pos ref alt sift_pred lrt_pred fathmm_pred mutationtaster_pred mutationassessor_pred polyphen2_hdiv_pred polyphen2_hvar_pred provean_pred MetaLR_pred MetaSVM_pred >snv.txt
python choose_damaging_variants.py snv.txt
vtools update ANNOVARtype --format VMT_annotation.fmt --from_file snv.txt.parsed 
vtools select ANNOVARtype "vmt_annotation='damaging_SNV'" -t damaging                                                                                                                      
vtools select damaging "chr=16 AND (pos>=63600000 AND pos<=79700000)" -o chr pos ref alt region_type region_name mut_type function rs_dbSNP141 ExAC_Adj_AF ExAC_SAS_AF CADD_phred FATHMM_pred LRT_pred MetaLR_pred MetaSVM_pred MutationAssessor_pred MutationTaster_pred Polyphen2_HDIV_pred Polyphen2_HVAR_pred PROVEAN_pred SIFT_pred "samples('geno_filter=GT=1')" "samples('geno_filter=GT=2')"
vtools update damaging --from_stat "totX=#(GT)" "homX=#(hom)" --samples "sample_name='L1' OR sample_name='L2'" -j2
vtools select damaging "totX=homX AND totX=2" -t homL1_L2
vtools remove fields totX homX
vtools output homL1_L2 chr pos ref alt region_type region_name mut_type function rs_dbSNP141 ExAC_Adj_AF ExAC_SAS_AF CADD_phred FATHMM_pred LRT_pred MetaLR_pred MetaSVM_pred MutationAssessor_pred MutationTaster_pred Polyphen2_HDIV_pred Polyphen2_HVAR_pred PROVEAN_pred SIFT_pred "samples('geno_filter=GT=1')" "samples('geno_filter=GT=2')"

##################################
# Example 2: Autosomal dominant  #
##################################

vtools import AD.vcf.gz --format NSHI.fmt --build hg19 -j8
vtools show tables
vtools show samples
vtools select variant "(ExAC_AF is NULL or ExAC_AF<0.0005) AND (ExAC_NFE_AF is NULL or ExAC_NFE_AF<0.0005)"  --samples "sample_name='AD1' OR sample_name='AD2'" -t  ExAC0005_AD
vtools select ExAC0005_AD "CADD_phred>15 or CADD_phred is NULL" -t CADD15_AD
vtools select CADD15_AD "dbNSFP.chr is not null" --output chr pos ref alt sift_pred lrt_pred fathmm_pred mutationtaster_pred mutationassessor_pred polyphen2_hdiv_pred polyphen2_hvar_pred provean_pred MetaLR_pred MetaSVM_pred >snv.txt
python choose_damaging_variants.py snv.txt 
vtools update variant --format VMT_annotation.fmt --from_file snv.txt.parsed 
vtools select CADD15_AD "vmt_annotation='damaging_SNV'" -t damaging_AD                                                                                                                      
vtools update damaging_AD --from_stat "totX=#(GT)" "hetX=#(het)" --samples "sample_name='AD1' OR sample_name='AD2'" -j2
vtools select damaging_AD "totX=hetX AND totX=2" -t hetAD_2
vtools remove fields totX hetX
vtools output hetAD_2 chr pos ref alt refGene.name2 rs_dbSNP141 ExAC_Adj_AF ExAC_SAS_AF CADD_phred FATHMM_pred LRT_pred MetaLR_pred MetaSVM_pred MutationAssessor_pred MutationTaster_pred Polyphen2_HDIV_pred Polyphen2_HVAR_pred PROVEAN_pred SIFT_pred "samples('geno_filter=GT=1')" "samples('geno_filter=GT=2')"

##################################
#       Example 3: De Novo       #
##################################

vtools import de_novo.vcf.gz --format NSHI.fmt --build hg19 -j8
vtools show tables
vtools show samples
vtools update variant --from_stat "totX=#(GT)" "hetX=#(het)" --samples "sample_name='Son'" -j2
vtools select variant "totX=hetX AND totX=1" -t Son_het
vtools update Son_het --from_stat "totX=#(GT)" "wtX=#(wtGT)" --samples "sample_name='Dad' OR sample_name='Mom'" -j2
vtools select Son_het "(totX=wtX AND totX=2) and ((ExAC_AF is NULL or ExAC_AF<0.0005) AND (ExAC_NFE_AF is NULL or ExAC_NFE_AF<0.0005))" -t deNovo
vtools output deNovo chr pos ref alt refGene.name2 rs_dbSNP141 ExAC_Adj_AF ExAC_NFE_AF CADD_phred FATHMM_pred LRT_pred MetaLR_pred MetaSVM_pred MutationAssessor_pred MutationTaster_pred Polyphen2_HDIV_pred Polyphen2_HVAR_pred PROVEAN_pred SIFT_pred "samples('geno_filter=GT=1')" "samples('geno_filter=GT=2')"