Difference between revisions of "VAT Commands in Exercise"
From Statistical Genetics Courses
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
==VAT Commands in Exercise== | ==VAT Commands in Exercise== | ||
− | <pre> vtools -h | + | <pre> |
+ | vtools -h | ||
vtools init VATDemo | vtools init VATDemo | ||
vtools import *.vcf.gz --var_info DP filter --geno_info DP_geno --build hg18 -j1 | vtools import *.vcf.gz --var_info DP filter --geno_info DP_geno --build hg18 -j1 | ||
Line 15: | Line 16: | ||
vtools show fields | vtools show fields | ||
vtools select variant --count | vtools select variant --count | ||
− | vtools show genotypes | + | vtools show genotypes > GenotypeSummary.txt |
head GenotypeSummary.txt | head GenotypeSummary.txt | ||
vtools output variant "max(DP)" "min(DP)" "avg(DP)" "stdev(DP)" "lower_quartile(DP)" "upper_quartile(DP)" --header | vtools output variant "max(DP)" "min(DP)" "avg(DP)" "stdev(DP)" "lower_quartile(DP)" "upper_quartile(DP)" --header | ||
Line 23: | Line 24: | ||
vtools show fields | vtools show fields | ||
vtools show table variant | vtools show table variant | ||
− | vtools update variant --from_stat 'totalGD10=#(GT)' 'numGD10=#(alt)' 'hetGD10=#(het)' 'homGD10=#(hom)' 'otherGD10=#(other)' 'mafGD10=maf()' --genotypes "DP_geno | + | vtools update variant --from_stat 'totalGD10=#(GT)' 'numGD10=#(alt)' 'hetGD10=#(het)' 'homGD10=#(hom)' 'otherGD10=#(other)' 'mafGD10=maf()' --genotypes "DP_geno > 10" |
vtools show fields | vtools show fields | ||
vtools show table variant | vtools show table variant | ||
Line 30: | Line 31: | ||
vtools phenotype --set "RACE=1" --samples "filename like 'CEU%'" | vtools phenotype --set "RACE=1" --samples "filename like 'CEU%'" | ||
vtools show samples --limit 10 | vtools show samples --limit 10 | ||
− | vtools update variant --from_stat 'CEU_mafGD10=maf()' --genotypes 'DP_geno | + | vtools update variant --from_stat 'CEU_mafGD10=maf()' --genotypes 'DP_geno>10' --samples "RACE=1" |
− | vtools update variant --from_stat 'YRI_mafGD10=maf()' --genotypes 'DP_geno | + | vtools update variant --from_stat 'YRI_mafGD10=maf()' --genotypes 'DP_geno>10' --samples "RACE=0" |
vtools output variant chr pos mafGD10 CEU_mafGD10 YRI_mafGD10 --header --limit 10 | vtools output variant chr pos mafGD10 CEU_mafGD10 YRI_mafGD10 --header --limit 10 | ||
− | vtools phenotype --from_stat 'CEU_totalGD10=#(GT)' 'CEU_numGD10=#(alt)' --genotypes 'DP_geno | + | vtools phenotype --from_stat 'CEU_totalGD10=#(GT)' 'CEU_numGD10=#(alt)' --genotypes 'DP_geno>10' --samples "RACE=1" |
− | vtools phenotype --from_stat 'YRI_totalGD10=#(GT)' 'YRI_numGD10=#(alt)' --genotypes 'DP_geno | + | vtools phenotype --from_stat 'YRI_totalGD10=#(GT)' 'YRI_numGD10=#(alt)' --genotypes 'DP_geno>10' --samples "RACE=0" |
vtools phenotype --output sample_name CEU_totalGD10 CEU_numGD10 YRI_totalGD10 YRI_numGD10 --header | vtools phenotype --output sample_name CEU_totalGD10 CEU_numGD10 YRI_totalGD10 YRI_numGD10 --header | ||
− | |||
− | |||
− | |||
− | |||
− | |||
vtools execute ANNOVAR geneanno | vtools execute ANNOVAR geneanno | ||
vtools output variant chr pos ref alt mut_type --limit 20 --header | vtools output variant chr pos ref alt mut_type --limit 20 --header | ||
vtools_report trans_ratio variant -n num | vtools_report trans_ratio variant -n num | ||
vtools_report trans_ratio variant -n numGD10 | vtools_report trans_ratio variant -n numGD10 | ||
− | vtools select variant "DP | + | vtools select variant "DP<15" -t to_remove |
vtools show tables | vtools show tables | ||
vtools remove variants to_remove -v0 | vtools remove variants to_remove -v0 | ||
vtools show tables | vtools show tables | ||
− | vtools remove genotypes "DP_geno | + | vtools remove genotypes "DP_geno<10" -v0 |
+ | vtools select variant "mut_type like 'non%' or mut_type like 'stop%' or region_type='splicing'" -t v_funct | ||
+ | vtools show tables | ||
+ | vtools show samples --limit 5 | ||
+ | vtools select variant --samples "RACE=1" -t CEU | ||
+ | mkdir -p ceu | ||
+ | cd ceu | ||
+ | vtools init ceu --parent ../ --variants CEU --samples "RACE=1" --build hg19 | ||
vtools show project | vtools show project | ||
− | vtools select variant "CEU_mafGD10 | + | vtools select variant "CEU_mafGD10>=0.05" -t common_ceu |
− | vtools select v_funct "CEU_mafGD10 | + | vtools select v_funct "CEU_mafGD10<0.01" -t rare_ceu |
+ | vtools use refGene | ||
+ | vtools show annotation refGene | ||
+ | vtools associate -h | ||
+ | vtools show tests | ||
+ | vtools show test LinRegBurden | ||
+ | vtools associate common_ceu BMI --covariate SEX -m "LinRegBurden --alternative 2" -j1 --to_db EA_CV > EA_CV.asso.res | ||
grep -i error *.log | grep -i error *.log | ||
less EA_CV.asso.res | less EA_CV.asso.res | ||
sort -g -k7 EA_CV.asso.res | head | sort -g -k7 EA_CV.asso.res | head | ||
vtools show fields | vtools show fields | ||
− | vtools associate rare_ceu BMI --covariate SEX -m "LinRegBurden --alternative 2" -g refGene.name2 -j1 --to_db EA_RV | + | vtools associate rare_ceu BMI --covariate SEX -m "LinRegBurden --alternative 2" -g refGene.name2 -j1 --to_db EA_RV > EA_RV.asso.res |
− | grep -i error *.log | tail - | + | grep -i error *.log | tail -10 |
less EA_RV.asso.res | less EA_RV.asso.res | ||
sort -g -k6 EA_RV.asso.res | head | sort -g -k6 EA_RV.asso.res | head | ||
− | vtools associate rare_ceu BMI --covariate SEX -m "VariableThresholdsQt --alternative 2 -p 100000 --adaptive 0.0005" -g refGene.name2 -j1 --to_db EA_RV | + | vtools associate rare_ceu BMI --covariate SEX -m "VariableThresholdsQt --alternative 2 -p 100000 --adaptive 0.0005" -g refGene.name2 -j1 --to_db EA_RV > EA_RV_VT.asso.res |
− | grep -i error *.log | tail - | + | grep -i error *.log | tail -10 |
less EA_RV_VT.asso.res | less EA_RV_VT.asso.res | ||
sort -g -k6 EA_RV_VT.asso.res | head | sort -g -k6 EA_RV_VT.asso.res | head | ||
vtools select rare_ceu "refGene.name2='ABCC1'" -o chr pos ref alt CEU_mafGD10 numGD10 mut_type --header | vtools select rare_ceu "refGene.name2='ABCC1'" -o chr pos ref alt CEU_mafGD10 numGD10 mut_type --header | ||
− | + | cd .. | |
− | + | vtools select variant --samples "RACE=0" -t YRI | |
− | + | mkdir -p yri; cd yri | |
− | vtools select v_funct "YRI_mafGD10 | + | vtools init yri --parent ../ --variants YRI --samples "RACE=0" --build hg19 |
− | vtools associate rare_yri BMI --covariate SEX -m "LinRegBurden --alternative 2" -g refGene.name2 -j1 --to_db YA_RV | + | vtools select variant "YRI_mafGD10>=0.05" -t common_yri |
− | vtools associate rare_yri BMI --covariate SEX -m "VariableThresholdsQt --alternative 2 -p 100000 --adaptive 0.0005" -g refGene.name2 -j1 --to_db YA_RV | + | vtools select v_funct "YRI_mafGD10<0.01" -t rare_yri |
+ | vtools use refGene | ||
+ | vtools associate common_yri BMI --covariate SEX -m "LinRegBurden --alternative 2" -j1 --to_db YA_CV > YA_CV.asso.res | ||
+ | vtools associate rare_yri BMI --covariate SEX -m "LinRegBurden --alternative 2" -g refGene.name2 -j1 --to_db YA_RV > YA_RV.asso.res | ||
+ | vtools associate rare_yri BMI --covariate SEX -m "VariableThresholdsQt --alternative 2 -p 100000 --adaptive 0.0005" -g refGene.name2 -j1 --to_db YA_RV > YA_RV_VT.asso.res | ||
cd .. | cd .. | ||
− | vtools_report meta_analysis ceu/EA_RV_VT.asso.res yri/YA_RV_VT.asso.res --beta 5 --pval 6 --se 7 -n 2 --link 1 | + | vtools_report meta_analysis ceu/EA_RV_VT.asso.res yri/YA_RV_VT.asso.res --beta 5 --pval 6 --se 7 -n 2 --link 1 > META_RV_VT.asso.res |
cut -f1,3 META_RV_VT.asso.res | head | cut -f1,3 META_RV_VT.asso.res | head | ||
</pre> | </pre> |
Latest revision as of 20:51, 7 June 2018
VAT Commands in Exercise
vtools -h vtools init VATDemo vtools import *.vcf.gz --var_info DP filter --geno_info DP_geno --build hg18 -j1 vtools liftover hg19 head phenotypes.csv vtools phenotype --from_file phenotypes.csv --delimiter "," vtools show project vtools show tables vtools show table variant vtools show samples vtools show genotypes vtools show fields vtools select variant --count vtools show genotypes > GenotypeSummary.txt head GenotypeSummary.txt vtools output variant "max(DP)" "min(DP)" "avg(DP)" "stdev(DP)" "lower_quartile(DP)" "upper_quartile(DP)" --header vtools select variant "filter='PASS'" --count vtools select variant "filter='PASS'" -o "max(DP)" "min(DP)" "avg(DP)" "stdev(DP)" "lower_quartile(DP)" "upper_quartile(DP)" --header vtools update variant --from_stat 'total=#(GT)' 'num=#(alt)' 'het=#(het)' 'hom=#(hom)' 'other=#(other)' 'minDP=min(DP_geno)' 'maxDP=max(DP_geno)' 'meanDP=avg(DP_geno)' 'maf=maf()' vtools show fields vtools show table variant vtools update variant --from_stat 'totalGD10=#(GT)' 'numGD10=#(alt)' 'hetGD10=#(het)' 'homGD10=#(hom)' 'otherGD10=#(other)' 'mafGD10=maf()' --genotypes "DP_geno > 10" vtools show fields vtools show table variant vtools output variant chr pos maf mafGD10 --header --limit 20 vtools phenotype --set "RACE=0" --samples "filename like 'YRI%'" vtools phenotype --set "RACE=1" --samples "filename like 'CEU%'" vtools show samples --limit 10 vtools update variant --from_stat 'CEU_mafGD10=maf()' --genotypes 'DP_geno>10' --samples "RACE=1" vtools update variant --from_stat 'YRI_mafGD10=maf()' --genotypes 'DP_geno>10' --samples "RACE=0" vtools output variant chr pos mafGD10 CEU_mafGD10 YRI_mafGD10 --header --limit 10 vtools phenotype --from_stat 'CEU_totalGD10=#(GT)' 'CEU_numGD10=#(alt)' --genotypes 'DP_geno>10' --samples "RACE=1" vtools phenotype --from_stat 'YRI_totalGD10=#(GT)' 'YRI_numGD10=#(alt)' --genotypes 'DP_geno>10' --samples "RACE=0" vtools phenotype --output sample_name CEU_totalGD10 CEU_numGD10 YRI_totalGD10 YRI_numGD10 --header vtools execute ANNOVAR geneanno vtools output variant chr pos ref alt mut_type --limit 20 --header vtools_report trans_ratio variant -n num vtools_report trans_ratio variant -n numGD10 vtools select variant "DP<15" -t to_remove vtools show tables vtools remove variants to_remove -v0 vtools show tables vtools remove genotypes "DP_geno<10" -v0 vtools select variant "mut_type like 'non%' or mut_type like 'stop%' or region_type='splicing'" -t v_funct vtools show tables vtools show samples --limit 5 vtools select variant --samples "RACE=1" -t CEU mkdir -p ceu cd ceu vtools init ceu --parent ../ --variants CEU --samples "RACE=1" --build hg19 vtools show project vtools select variant "CEU_mafGD10>=0.05" -t common_ceu vtools select v_funct "CEU_mafGD10<0.01" -t rare_ceu vtools use refGene vtools show annotation refGene vtools associate -h vtools show tests vtools show test LinRegBurden vtools associate common_ceu BMI --covariate SEX -m "LinRegBurden --alternative 2" -j1 --to_db EA_CV > EA_CV.asso.res grep -i error *.log less EA_CV.asso.res sort -g -k7 EA_CV.asso.res | head vtools show fields vtools associate rare_ceu BMI --covariate SEX -m "LinRegBurden --alternative 2" -g refGene.name2 -j1 --to_db EA_RV > EA_RV.asso.res grep -i error *.log | tail -10 less EA_RV.asso.res sort -g -k6 EA_RV.asso.res | head vtools associate rare_ceu BMI --covariate SEX -m "VariableThresholdsQt --alternative 2 -p 100000 --adaptive 0.0005" -g refGene.name2 -j1 --to_db EA_RV > EA_RV_VT.asso.res grep -i error *.log | tail -10 less EA_RV_VT.asso.res sort -g -k6 EA_RV_VT.asso.res | head vtools select rare_ceu "refGene.name2='ABCC1'" -o chr pos ref alt CEU_mafGD10 numGD10 mut_type --header cd .. vtools select variant --samples "RACE=0" -t YRI mkdir -p yri; cd yri vtools init yri --parent ../ --variants YRI --samples "RACE=0" --build hg19 vtools select variant "YRI_mafGD10>=0.05" -t common_yri vtools select v_funct "YRI_mafGD10<0.01" -t rare_yri vtools use refGene vtools associate common_yri BMI --covariate SEX -m "LinRegBurden --alternative 2" -j1 --to_db YA_CV > YA_CV.asso.res vtools associate rare_yri BMI --covariate SEX -m "LinRegBurden --alternative 2" -g refGene.name2 -j1 --to_db YA_RV > YA_RV.asso.res vtools associate rare_yri BMI --covariate SEX -m "VariableThresholdsQt --alternative 2 -p 100000 --adaptive 0.0005" -g refGene.name2 -j1 --to_db YA_RV > YA_RV_VT.asso.res cd .. vtools_report meta_analysis ceu/EA_RV_VT.asso.res yri/YA_RV_VT.asso.res --beta 5 --pval 6 --se 7 -n 2 --link 1 > META_RV_VT.asso.res cut -f1,3 META_RV_VT.asso.res | head