From 5a9f5795ad8a6d8d13378a9fd620d79a664d0e1d Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Tue, 3 Jul 2018 14:29:47 -0600 Subject: [PATCH 1/9] creating score, truth, gene, population sets --- paper/create.sh | 120 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 paper/create.sh diff --git a/paper/create.sh b/paper/create.sh new file mode 100644 index 0000000..be39dd9 --- /dev/null +++ b/paper/create.sh @@ -0,0 +1,120 @@ +#create score sets + +cd ../score-sets/GRCh37/CADD +bash make.sh +cd - + +cd ../score-sets/GRCh37/CCR +bash make.sh +cd - + +cd ../score-sets/GRCh37/DANN +bash make.sh +cd - + +cd ../score-sets/GRCh37/GERP +bash make.sh +cd - + +cd ../score-sets/GRCh37/MCAP +bash make.sh +cd - + +cd ../score-sets/GRCh37/MPC +bash make.sh +cd - + +cd ../score-sets/GRCh37/MTR +bash make.sh +cd - + +cd ../score-sets/GRCh37/REVEL +bash make.sh +cd - + +cd ../score-sets/GRCh37/RVIS +bash make.sh +cd - + +cd ../score-sets/GRCh37/VVP +bash make.sh +cd - + +cd ../score-sets/GRCh37/aloft +bash make.sh +cd - + +cd ../score-sets/GRCh37/fathmm +bash make.sh +cd - + +cd ../score-sets/GRCh37/fitcons +bash make.sh +cd - + +cd ../score-sets/GRCh37/metasvm +bash make.sh +cd - + +cd ../score-sets/GRCh37/mis_Z +bash make.sh +cd - + +cd ../score-sets/GRCh37/pLI +bash make.sh +cd - + +cd ../score-sets/GRCh37/phastCons +bash make.sh +cd - + +cd ../score-sets/GRCh37/phylop +bash make.sh +cd - + +cd ../score-sets/GRCh37/polyphen2 +bash make.sh +cd - + +cd ../score-sets/GRCh37/sift +bash make.sh +cd - + +# make truth sets + +cd ../truth-sets/GRCh37/clinvar +bash make.sh +cd - + +cd ../truth-sets/GRCh37/homsy +bash make.sh +cd - + +cd ../truth-sets/GRCh37/samocha +bash make.sh +cd - + +cd ../truth-sets/GRCh37/wellderly +bash make.sh +cd - + +cd ../truth-sets/GRCh37/wigler-autism +bash make.sh +cd - + +# make gene sets + +cd ../gene-sets/GRCh37/ad_genes/ +bash make.sh +cd - + +cd ../gene-sets/GRCh37/hi_genes/ +bash make.sh +cd - + +# make population sets + +cd ../scripts/gnomad +bash makeexac.sh +bash makegnomad.sh +cd - From 159474e8484a9638d67b702c8ad1c4c5970aba1a Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Wed, 25 Jul 2018 13:50:24 -0600 Subject: [PATCH 2/9] annotating truth sets with score sets --- paper/annotate.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 paper/annotate.sh diff --git a/paper/annotate.sh b/paper/annotate.sh new file mode 100644 index 0000000..930deb0 --- /dev/null +++ b/paper/annotate.sh @@ -0,0 +1,39 @@ +#!/bin/bash +#SBATCH --account=quinlan-kp +#SBATCH --partition=quinlan-kp +#SBATCH -o %j-%N.out +#SBATCH -e %j-%N.err +#SBATCH --time=20:00:00 + +######### +#CLINVAR# +######### + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/clinvar/clinvar-benign.20170905.vcf.gz --prefix benign + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/clinvar/clinvar-pathogenic-likely_pathogenic.20170905.vcf.gz --prefix pathogenic + +######### +#SAMOCHA# +######### + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/samocha/samocha.benign.vcf.gz --prefix benign + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/samocha/samocha.pathogenic.vcf.gz --prefix pathogenic + +####### +#HOMSY# +####### + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/homsy/homsy.benign.vcf.gz --prefix benign + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/homsy/homsy.pathogenic.vcf.gz --prefix pathogenic + +######## +#WIGLER# +######## + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/wigler-autism/wigler-autism.benign.vcf.gz --prefix benign + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/wigler-autism/wigler-autism.pathogenic.vcf.gz --prefix pathogenic + From d4fb5442a41df7582689ed3b8970ba5579719b45 Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Fri, 14 Sep 2018 00:40:35 -0600 Subject: [PATCH 3/9] new gene sets added --- paper/create.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/paper/create.sh b/paper/create.sh index be39dd9..a233e25 100644 --- a/paper/create.sh +++ b/paper/create.sh @@ -112,6 +112,22 @@ cd ../gene-sets/GRCh37/hi_genes/ bash make.sh cd - +cd ../gene-sets/GRCh37/ar_genes/ +bash make.sh +cd - + +cd ../gene-sets/GRCh37/cancer_genes/ +bash make.sh +cd - + +cd ../gene-sets/GRCh37/heart_genes/ +bash make.sh +cd - + +cd ../gene-sets/GRCh37/eiee_genes/ +bash make.sh +cd - + # make population sets cd ../scripts/gnomad From bd9ccc99f7221acc54fdde7dc09d59c22fc6cf17 Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Sat, 27 Oct 2018 13:01:23 -0600 Subject: [PATCH 4/9] added some gene set annotation, fixing scripts, added evaluate --- paper/annotate.sh | 37 ++++++++++++++++++++++++++++--------- paper/evaluate.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 paper/evaluate.sh diff --git a/paper/annotate.sh b/paper/annotate.sh index 930deb0..ea3a199 100644 --- a/paper/annotate.sh +++ b/paper/annotate.sh @@ -3,37 +3,56 @@ #SBATCH --partition=quinlan-kp #SBATCH -o %j-%N.out #SBATCH -e %j-%N.err -#SBATCH --time=20:00:00 +#SBATCH --time=48:00:00 ######### #CLINVAR# ######### -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/clinvar/clinvar-benign.20170905.vcf.gz --prefix benign +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/clinvar/clinvar-benign.20170905.vcf.gz --prefix benign -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/clinvar/clinvar-pathogenic-likely_pathogenic.20170905.vcf.gz --prefix pathogenic +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/clinvar/clinvar-pathogenic-likely_pathogenic.20170905.vcf.gz --prefix pathogenic + +# ad gene files +python ../pathoscore.py annotate pathogenic.vcf.gz --exclude ../gene-sets/GRCh37/ad_genes/ad_gene_complement.bed.gz --prefix adgene.pathogenic +python ../pathoscore.py annotate benign.vcf.gz --exclude ../gene-sets/GRCh37/ad_genes/ad_gene_complement.bed.gz --prefix adgene.benign + +# ar gene files +python ../pathoscore.py annotate pathogenic.vcf.gz --exclude ../gene-sets/GRCh37/ar_genes/ar_gene_complement.bed.gz --prefix argene.pathogenic +python ../pathoscore.py annotate benign.vcf.gz --exclude ../gene-sets/GRCh37/ar_genes/ar_gene_complement.bed.gz --prefix argene.benign + +# filtered pathogenics on ClinVar +python ../pathoscore.py annotate pathogenic.vcf.gz --exclude ../scripts/gnomad/ExAC.vcf.gz --exclude ../scripts/gnomad/gnomad.vcf.gz --prefix pathogenic.filter ######### #SAMOCHA# ######### -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/samocha/samocha.benign.vcf.gz --prefix benign +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/samocha/samocha.benign.vcf.gz --prefix control -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/samocha/samocha.pathogenic.vcf.gz --prefix pathogenic +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/samocha/samocha.pathogenic.vcf.gz --prefix neurodev + +# filtered pathogenics on samocha +python ../pathoscore.py annotate neurodev.vcf.gz --exclude ../scripts/gnomad/ExAC.vcf.gz --exclude ../scripts/gnomad/gnomad.vcf.gz --prefix neurodev.filter ####### #HOMSY# ####### -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/homsy/homsy.benign.vcf.gz --prefix benign +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/homsy/homsy.benign.vcf.gz --prefix hombenign + +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/homsy/homsy.pathogenic.vcf.gz --prefix hompathogenic -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/homsy/homsy.pathogenic.vcf.gz --prefix pathogenic +# filtered pathogenics on homsy +python ../pathoscore.py annotate hompathogenic.vcf.gz --exclude ../scripts/gnomad/ExAC.vcf.gz --exclude ../scripts/gnomad/gnomad.vcf.gz --prefix hompathogenic.filter ######## #WIGLER# ######## -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/wigler-autism/wigler-autism.benign.vcf.gz --prefix benign +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/wigler-autism/wigler-autism.benign.vcf.gz --prefix wigbenign -python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/MetaSVM.sorted.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/Polyphen2_HVAR.sorted.txt.gz:polyphen2_hvar:5:max --scores ../score-sets/GRCh37/sift/SIFT_sorted.scores.txt.gz:SIFT:5:max ../truth-sets/GRCh37/wigler-autism/wigler-autism.pathogenic.vcf.gz --prefix pathogenic +python ../pathoscore.py annotate --scores ../score-sets/GRCh37/CCR/ccrs.autosomes.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CCR/ccrs.xchrom.v2.20180420.bed.gz:CCR:4:max --scores ../score-sets/GRCh37/CADD/whole_genome_SNVs.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/CADD/InDels.tsv.gz:CADD:6:max --scores ../score-sets/GRCh37/DANN/DANN_whole_genome_SNVs.tsv.bgz:DANN:5:max --scores ../score-sets/GRCh37/GERP/gerp_rs.txt.gz:GERP:3:max --scores ../score-sets/GRCh37/MCAP/mcap.txt.gz:MCAP:5:max --scores ../score-sets/GRCh37/MPC/mpc.txt.gz:MPC:5:max --scores ../score-sets/GRCh37/MTR/mtrflatfile_1.0.txt.gz:MTR:11:max --scores ../score-sets/GRCh37/REVEL/revel.txt.gz:REVEL:7:max --scores ../score-sets/GRCh37/RVIS/rvis.bed.gz:RVIS:5:max --scores ../score-sets/GRCh37/VVP/VVP_scores_allChr.txt.gz:VVP:5:max --scores ../score-sets/GRCh37/aloft/aloft.txt.gz:aloft_het,aloft_lof,aloft_rec:5,6,7:max,max,max --scores ../score-sets/GRCh37/fathmm/fathmm/fathmm.txt.gz:fathmm_non,fathmm_coding:5,6:max,max --scores ../score-sets/GRCh37/fitcons/fitcons/fitcons.bed.gz:fitCons:4:max --scores ../score-sets/GRCh37/metasvm/metasvm.txt.gz:MetaSVM:5:max --scores ../score-sets/GRCh37/mis_Z/missensez.bed.gz:missense_z:5:max --scores ../score-sets/GRCh37/pLI/pLI.bed.gz:pLI:5:max --scores ../score-sets/GRCh37/phastCons/phastcons_vertebrate.txt.gz:phastCons:4:max --scores ../score-sets/GRCh37/polyphen2/polyphen2/polyphen2.txt.gz:polyphen2_hvar:6:max --scores ../score-sets/GRCh37/sift/sift.txt.gz:SIFT:12:max ../truth-sets/GRCh37/wigler-autism/wigler-autism.pathogenic.vcf.gz --prefix wigpathogenic +# filtered pathogenics on wigler +python ../pathoscore.py annotate wigpathogenic.vcf.gz --exclude ../scripts/gnomad/ExAC.vcf.gz --exclude ../scripts/gnomad/gnomad.vcf.gz --prefix wigpathogenic.filter diff --git a/paper/evaluate.sh b/paper/evaluate.sh new file mode 100644 index 0000000..2baa491 --- /dev/null +++ b/paper/evaluate.sh @@ -0,0 +1,28 @@ +######### +#CLINVAR# +######### + +# to get AD variant data and ROCs +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarad -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf adgene.pathogenic.vcf.gz adgene.benign.vcf.gz + +# to get AR variant data and ROCs +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarar -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf argene.pathogenic.vcf.gz argene.benign.vcf.gz + +# regular clinvar +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf pathogenic.vcf.gz benign.vcf.gz + +# filtered clinvar +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarfilter -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf pathogenic.filter.vcf.gz benign.vcf.gz + +######### +#SAMOCHA# +######### + +# regular samocha +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samocha -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf neurodev.vcf.gz control.vcf.gz + +# samocha benigns, clinvar pathogenics +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarsamocha -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf pathogenic.vcf.gz control.vcf.gz + +# filtered samocha +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samochafilter -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf neurodev.filter.vcf.gz control.vcf.gz From ccbc7a4e9225f396bd69f1e62666e250f2b6f6c3 Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Mon, 25 Mar 2019 15:13:43 -0600 Subject: [PATCH 5/9] correlation matrix work --- paper/correlation.py | 58 ++++++++++++++++++++++++++++++++++++++++++++ paper/correlation.sh | 1 + 2 files changed, 59 insertions(+) create mode 100644 paper/correlation.py create mode 100644 paper/correlation.sh diff --git a/paper/correlation.py b/paper/correlation.py new file mode 100644 index 0000000..2215cd0 --- /dev/null +++ b/paper/correlation.py @@ -0,0 +1,58 @@ +from __future__ import print_function +metrics = ["CCR", "CADD", "DANN", "GERP", "MCAP", "MPC", "MTR", "REVEL", "RVIS", "VVP", "aloft_het", "aloft_lof", "aloft_rec", "fathmm_non", "fathmm_coding", "fitCons", "MetaSVM", "missense_z", "pLI", "phastCons", "polyphen2_hvar", "SIFT", "mis_badness", "Grantham", "BLOSUM"] +from cyvcf2 import VCF +import pandas as pd +from argparse import ArgumentParser +import matplotlib +matplotlib.use('Agg') +import matplotlib.backends.backend_pdf +from matplotlib import pyplot as plt +from matplotlib import ticker +#import seaborn as sns +#sns.set_style('white') +import sys +if sys.version_info.major > 2: + xrange = range + +def key_val(arg): + return arg.split(",") +parser = ArgumentParser(description = "create correlation matrix for metrics across different truth sets") +parser.add_argument("-f", "--file", help = "input vcfs", type=key_val, nargs = "+") +parser.add_argument("-n", "--name", help = "evaluation set names/titles", nargs = "+") +parser.add_argument("-o", "--output", help = "output file") +args = parser.parse_args() + +corr = {} +for var, name in zip(args.file, args.name): + patho, benign = var + vcfpatho = VCF(patho) + vcfbenign = VCF(benign) + p = pd.DataFrame([variant.INFO.get(key) for key in metrics] for variant in vcfpatho) + b = pd.DataFrame([variant.INFO.get(key) for key in metrics] for variant in vcfbenign) + p.columns = metrics + b.columns = metrics + d = p.append(b) + corr[name] = d.corr(method = 'kendall') + print(corr) +print(d) + +plt.rcParams["figure.figsize"]=(5,5) +matplotlib.rcParams['pdf.fonttype'] = 42 +matplotlib.rcParams['font.family'] = 'sans-serif' +matplotlib.rcParams['font.sans-serif'] = ['Arial'] +print(len(args.file)) +#fig, ax = plt.subplots(len(args.file), 1) +for i, name in enumerate(args.name): + fig, ax = plt.subplots(1) + g = ax.matshow(corr[name], interpolation = 'nearest', cmap = plt.cm.Blues) + fig.colorbar(g, ax=ax) + ax.xaxis.set_major_locator(ticker.LinearLocator(numticks = len(metrics))) + ax.yaxis.set_major_locator(ticker.LinearLocator(numticks = len(metrics))) + ax.set_xticklabels(metrics) + ax.set_yticklabels(metrics) + plt.setp(ax.get_xticklabels(), fontsize = 10, rotation = 'vertical') + plt.title(name, y=1.35) +pdf = matplotlib.backends.backend_pdf.PdfPages(args.output) +for fig in xrange(1, plt.gcf().number+1): ## will open an empty extra figure :( + pdf.savefig(fig, bbox_inches = 'tight') +pdf.close() diff --git a/paper/correlation.sh b/paper/correlation.sh new file mode 100644 index 0000000..4abac4e --- /dev/null +++ b/paper/correlation.sh @@ -0,0 +1 @@ +python correlation.py -f pathogenic.vcf.gz,benign.vcf.gz -n ClinVar -o $HOME/public_html/pathoscorepaper/correlation.pdf From 63fe3f44bb82884ac9be58cbed1308758dcfef1f Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Mon, 1 Apr 2019 05:14:17 -0600 Subject: [PATCH 6/9] added evaluations, annotations for figures, figure script, top 10 genes, and F1 score to csv in pathoscore --- paper/annotate.sh | 3 ++- paper/evaluate.sh | 45 +++++++++++++++++++++++++++++++++++---------- paper/figures.sh | 27 +++++++++++++++++++++++++++ paper/scangenes.py | 21 +++++++++++++++++++++ paper/scangenes.sh | 2 ++ pathoscore.py | 7 ++++++- 6 files changed, 93 insertions(+), 12 deletions(-) create mode 100644 paper/figures.sh create mode 100644 paper/scangenes.py create mode 100644 paper/scangenes.sh diff --git a/paper/annotate.sh b/paper/annotate.sh index ea3a199..bc3fa5b 100644 --- a/paper/annotate.sh +++ b/paper/annotate.sh @@ -21,8 +21,9 @@ python ../pathoscore.py annotate benign.vcf.gz --exclude ../gene-sets/GRCh37/ad_ python ../pathoscore.py annotate pathogenic.vcf.gz --exclude ../gene-sets/GRCh37/ar_genes/ar_gene_complement.bed.gz --prefix argene.pathogenic python ../pathoscore.py annotate benign.vcf.gz --exclude ../gene-sets/GRCh37/ar_genes/ar_gene_complement.bed.gz --prefix argene.benign -# filtered pathogenics on ClinVar +# filtered pathogenics/benigns on ClinVar python ../pathoscore.py annotate pathogenic.vcf.gz --exclude ../scripts/gnomad/ExAC.vcf.gz --exclude ../scripts/gnomad/gnomad.vcf.gz --prefix pathogenic.filter +python ../pathoscore.py annotate benign.vcf.gz --exclude ../scripts/gnomad/ExAC.vcf.gz --exclude ../scripts/gnomad/gnomad.vcf.gz --prefix benign.filter ######### #SAMOCHA# diff --git a/paper/evaluate.sh b/paper/evaluate.sh index 2baa491..b28876c 100644 --- a/paper/evaluate.sh +++ b/paper/evaluate.sh @@ -2,27 +2,52 @@ #CLINVAR# ######### +# metrics of choice: VVP, CCR, MPC, CADD, REVEL, RVIS, MCAP, GERP++, MetaSVM, aLoFT_Dominant, MTR, Grantham (chosen based on performance and historical value) + # to get AD variant data and ROCs -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarad -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf adgene.pathogenic.vcf.gz adgene.benign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarad -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf adgene.pathogenic.vcf.gz adgene.benign.vcf.gz # to get AR variant data and ROCs -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarar -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf argene.pathogenic.vcf.gz argene.benign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarar -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf argene.pathogenic.vcf.gz argene.benign.vcf.gz # regular clinvar -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf pathogenic.vcf.gz benign.vcf.gz +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT -s mis_badness -i BLOSUM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz + +# pathogenic filtered clinvar on functional and gnomAD +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.vcf.gz -# filtered clinvar -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarfilter -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf pathogenic.filter.vcf.gz benign.vcf.gz +# clinvar 100% gnomad filtered plus functional +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarbenignfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.filter.vcf.gz ######### #SAMOCHA# ######### -# regular samocha -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samocha -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf neurodev.vcf.gz control.vcf.gz +# regular samocha; functional filter doesn't matter, since there are no non-protein-altering variants. +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/samocha -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf --goi neurodevgenes.txt neurodev.vcf.gz control.vcf.gz -# samocha benigns, clinvar pathogenics -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarsamocha -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf pathogenic.vcf.gz control.vcf.gz +# samocha benigns, clinvar pathogenics, filtered functionally +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarsamocha -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.vcf.gz control.vcf.gz # filtered samocha -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samochafilter -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT --suffix pdf neurodev.filter.vcf.gz control.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samochafilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf neurodev.filter.vcf.gz control.vcf.gz + +######### +#HOMSY### +######### + +# regular homsy +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/homsy -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.vcf.gz hombenign.vcf.gz + +# filtered homsy +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/homsyfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.filter.vcf.gz hombenign.vcf.gz + +######### +#WIGLER## +######### + +# regular wigler +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/wigler -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf wigpathogenic.vcf.gz wigbenign.vcf.gz + +# filtered wigler +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/wiglerfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf wigpathogenic.filter.vcf.gz wigbenign.vcf.gz diff --git a/paper/figures.sh b/paper/figures.sh new file mode 100644 index 0000000..c39e8d9 --- /dev/null +++ b/paper/figures.sh @@ -0,0 +1,27 @@ +############## +# ANNOTATION # +############## +bash annotate.sh + +############## +# EVALUATION # +############## + +# Table 3 +bash scangenes.sh # gets top 10 ClinVar/Samocha Genes + +# Figures 1, 2, 3, 4; Table 3 (default list is top 10 ClinVar genes according to Yandell lab; we used top 10 in our ClinVar patho file, and top 10 list of Samocha set was manually curated via neurodev set as well) +bash evaluate.sh + +# Table 1 +# to get this one, just used the results of evaluate.sh and looked by hand through ClinVar. no real script. + +# Table 2 +# grabbed them from the results of evaluate.sh by hand. no script, parsing the HTML was too difficult, may want to use plot.ly python library in future releases (used unfiltered sets for all scores) + + +############### +# CORRELATION # +############### +# Figure 5 +bash correlation.sh diff --git a/paper/scangenes.py b/paper/scangenes.py new file mode 100644 index 0000000..4c465ce --- /dev/null +++ b/paper/scangenes.py @@ -0,0 +1,21 @@ +from __future__ import print_function +from cyvcf2 import VCF +import sys +from collections import Counter + +vcf = VCF(sys.argv[1]) # clinvar/samocha files go here + +""" +Simply grabs the first gene entry for each BCSQ info field. Genes will often repeat multiple times in the same BCSQ string, and though they may be different in rare cases, this will give a nonetheless accurate count of the 10 most frequent genes in each variant set. +""" + +c = Counter() +for variant in vcf: + gene=str(variant.INFO.get("BCSQ").split(",")[0].split("|")[1]) + c.update({gene: 1}) +topten = c.most_common(10) +out=sys.argv[1].split(".")[0]+"genes.txt" +f=open(out, 'w') +for i in topten: + print (i[0], file=f) +f.close() diff --git a/paper/scangenes.sh b/paper/scangenes.sh new file mode 100644 index 0000000..0df8664 --- /dev/null +++ b/paper/scangenes.sh @@ -0,0 +1,2 @@ +python scangenes.py pathogenic.vcf.gz +python scangenes.py neurodev.vcf.gz diff --git a/pathoscore.py b/pathoscore.py index 9ee1767..6a6cc62 100644 --- a/pathoscore.py +++ b/pathoscore.py @@ -22,6 +22,10 @@ from sklearn.preprocessing import minmax_scale sns.set_style('white') +matplotlib.rcParams['pdf.fonttype'] = 42 +matplotlib.rcParams['font.family'] = 'sans-serif' +matplotlib.rcParams['font.sans-serif'] = ['Arial'] + __version__ = "0.1.3" WIDTH = 7 @@ -258,7 +262,7 @@ def plot(score_methods, scored, unscored, scorable, prefix, title=None, suffix=" }] jdist_traces = [] jindices = {} - output = OrderedDict((k, []) for k in ('method', 'J', 'score@J', 'se(J)', 'TPR@J', 'FPR@J', 'AUC', 'TP@J', 'FP@J', 'TN@J', 'FN@J')) + output = OrderedDict((k, []) for k in ('method', 'J', 'score@J', 'se(J)', 'TPR@J', 'FPR@J', 'AUC', 'TP@J', 'FP@J', 'TN@J', 'FN@J', 'F1@J')) for i, f in enumerate(score_methods): if len(scored[f][0]) == 0: print("skipping %s because no negatives" % f, file=sys.stderr) @@ -310,6 +314,7 @@ def plot(score_methods, scored, unscored, scorable, prefix, title=None, suffix=" output['FP@J'].append(C) output['TN@J'].append(D) output['FN@J'].append(B) + output['F1@J'].append(f1) label = "%s (AUC: %.2f, Peak J-score: %.2f)" % (f, auc_score, J) label2 = "%s (%.2f, %.2f)" % (f, auc_score, J) roc_traces.append({ From 388449f127aff5c8360524cfaa99731f0c737690 Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Wed, 1 May 2019 17:04:09 -0600 Subject: [PATCH 7/9] added clinical utility table printing to TSV for paper calculations --- pathoscore.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pathoscore.py b/pathoscore.py index 6a6cc62..7f5ea27 100644 --- a/pathoscore.py +++ b/pathoscore.py @@ -734,6 +734,8 @@ def add_eval_args(p): functional=a.functional, goi=goi) jindices, score_methods, score_counts, roc_traces, pr_traces, jbar_trace, jdist_traces, score_step_divs, step_traces = plot(methods, scored, unscored, scorable, a.prefix, a.title, a.suffix, goi) cu, header = clinical_utility(scoredbygene, unscoredbygene, jindices, a.prefix, goi) + print ("\t".join([i["title"] for i in header]), file=open(a.prefix+".cu.tsv","w")) + print ("\n".join(["\t".join(j) for j in cu]), file=open(a.prefix+".cu.tsv","a")) plotly_html(score_methods, score_counts, roc_traces, pr_traces, jbar_trace, jdist_traces, score_step_divs, step_traces, scorable, a.prefix, cu, header) From 785edcd502718ac99dabaa12ad3eceaf55b192f1 Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Fri, 3 May 2019 03:02:37 -0600 Subject: [PATCH 8/9] added grouped barplots for cu and auc/f1/j, amended evaluate.sh --- paper/cubarplot.py | 26 ++++++++++++++++++++++++++ paper/cubarplots.sh | 2 ++ paper/evaluate.sh | 9 ++++++++- paper/figures.sh | 9 +++++++-- paper/scorebarplot.py | 41 +++++++++++++++++++++++++++++++++++++++++ paper/scorebarplots.sh | 1 + 6 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 paper/cubarplot.py create mode 100644 paper/cubarplots.sh create mode 100644 paper/scorebarplot.py create mode 100644 paper/scorebarplots.sh diff --git a/paper/cubarplot.py b/paper/cubarplot.py new file mode 100644 index 0000000..7e375f7 --- /dev/null +++ b/paper/cubarplot.py @@ -0,0 +1,26 @@ +from __future__ import print_function +import numpy as np +import matplotlib +matplotlib.use('Agg') +from matplotlib import pyplot as plt +import sys +import pandas as pd + +plt.rcParams["figure.figsize"]=(14,5) +with open(sys.argv[1], 'r') as clinicaltable: + df = pd.read_csv(clinicaltable, sep='\t', index_col=0) + df = df.T + print(df) + # header=clinicaltable.readline().strip().split("\t") + # print (header) + # for line in clinicaltable: + # print(line.strip().split("\t")) + + +ax = df.plot.bar(rot=0,legend=False,width=.8,align='center', fontsize=18) +ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize=18) +ax.set_ylabel("Clinical Utility", fontsize=18) +plt.tight_layout() +plt.savefig("".join(sys.argv[1].split(".cu.tsv",)[0])+"cubarplot.pdf", bbox_inches="tight") + +#fig, ax = plt.subplots() diff --git a/paper/cubarplots.sh b/paper/cubarplots.sh new file mode 100644 index 0000000..97268a0 --- /dev/null +++ b/paper/cubarplots.sh @@ -0,0 +1,2 @@ +python cubarplot.py $HOME/public_html/pathoscorepaper/clinvar.cu.tsv +python cubarplot.py $HOME/public_html/pathoscorepaper/samocha.cu.tsv diff --git a/paper/evaluate.sh b/paper/evaluate.sh index b28876c..fa42e13 100644 --- a/paper/evaluate.sh +++ b/paper/evaluate.sh @@ -1,3 +1,5 @@ +mkdir -p $HOME/public_html/pathoscorepaper + ######### #CLINVAR# ######### @@ -11,7 +13,9 @@ python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathosc python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarar -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf argene.pathogenic.vcf.gz argene.benign.vcf.gz # regular clinvar -python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT -s mis_badness -i BLOSUM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvarall -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT -s mis_badness -i BLOSUM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz + +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz # pathogenic filtered clinvar on functional and gnomAD python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.vcf.gz @@ -42,6 +46,9 @@ python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/homs # filtered homsy python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/homsyfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.filter.vcf.gz hombenign.vcf.gz +# homsy benigns, clinvar pathogenics, filtered functionally +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarhomsy -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.vcf.gz hombenign.vcf.gz + ######### #WIGLER## ######### diff --git a/paper/figures.sh b/paper/figures.sh index c39e8d9..80809c1 100644 --- a/paper/figures.sh +++ b/paper/figures.sh @@ -10,15 +10,20 @@ bash annotate.sh # Table 3 bash scangenes.sh # gets top 10 ClinVar/Samocha Genes -# Figures 1, 2, 3, 4; Table 3 (default list is top 10 ClinVar genes according to Yandell lab; we used top 10 in our ClinVar patho file, and top 10 list of Samocha set was manually curated via neurodev set as well) +# Figures 1, 2, 5, 6; Table 3 (default list is top 10 ClinVar genes according to Yandell lab; we used top 10 in our ClinVar patho file, and top 10 list of Samocha set was manually curated via neurodev set as well) bash evaluate.sh -# Table 1 +# Table 1 (or results for cutoff section) # to get this one, just used the results of evaluate.sh and looked by hand through ClinVar. no real script. +# for MetaSVM data... +python checkcutoff.py pathogenic.vcf.gz benign.vcf.gz # Table 2 # grabbed them from the results of evaluate.sh by hand. no script, parsing the HTML was too difficult, may want to use plot.ly python library in future releases (used unfiltered sets for all scores) +# Bar plots (Figures 4 and 5) +bash scorebarplots.sh # Figure 4 +bash cubarplots.sh # Figure 5 ############### # CORRELATION # diff --git a/paper/scorebarplot.py b/paper/scorebarplot.py new file mode 100644 index 0000000..802b7a8 --- /dev/null +++ b/paper/scorebarplot.py @@ -0,0 +1,41 @@ +from __future__ import print_function +import numpy as np +import matplotlib +matplotlib.use('Agg') +from matplotlib import pyplot as plt +import sys +import pandas as pd + +plt.rcParams["figure.figsize"]=(14,5) +with open(sys.argv[1], 'r') as clinvartable, open(sys.argv[2], 'r') as samochatable, open(sys.argv[3], 'r') as homsytable, open(sys.argv[4], 'r') as wiglertable: + c = pd.read_csv(clinvartable, sep=",", index_col=0) + s = pd.read_csv(samochatable, sep=",", index_col=0) + h = pd.read_csv(homsytable, sep=",", index_col=0) + w = pd.read_csv(wiglertable, sep=",", index_col=0) + auc = pd.DataFrame([c["AUC"],s["AUC"],h["AUC"],w["AUC"]]).T + j = pd.DataFrame([c["J"],s["J"],h["J"],w["J"]]).T + f1 = pd.DataFrame([c["F1@J"],s["F1@J"],h["F1@J"],w["F1@J"]]).T + columns = ["ClinVar","Samocha","Homsy","Wigler"] + auc.columns, j.columns, f1.columns = columns, columns, columns + +ax = auc.plot.bar(rot=0,legend=False,width=.8,align='center', fontsize = 16) +ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize = 18) +ax.set_ylabel("AUC", fontsize = 18) +ax.set_ylim(0.4, 1) +ax.set_xlabel("method", fontsize = 16) +plt.tight_layout() +plt.savefig("".join(sys.argv[1].rsplit("/",1)[0])+"/aucbarplot.pdf", bbox_inches="tight") + +ax = j.plot.bar(rot=0,legend=False,width=.8,align='center', fontsize = 16) +ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize = 18) +ax.set_ylabel("Peak J", fontsize = 18) +ax.set_xlabel("method", fontsize = 16) +plt.tight_layout() +plt.savefig("".join(sys.argv[1].rsplit("/",1)[0])+"/jbarplot.pdf", bbox_inches="tight") + +ax = f1.plot.bar(rot=0,legend=False,width=.8,align='center', fontsize = 16) +ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize = 18) +ax.set_ylabel("F1 @ Peak J", fontsize = 18) +ax.set_xlabel("method", fontsize = 16) +plt.tight_layout() +plt.savefig("".join(sys.argv[1].rsplit("/",1)[0])+"/f1barplot.pdf", bbox_inches="tight") diff --git a/paper/scorebarplots.sh b/paper/scorebarplots.sh new file mode 100644 index 0000000..08d2420 --- /dev/null +++ b/paper/scorebarplots.sh @@ -0,0 +1 @@ +python scorebarplot.py $HOME/public_html/pathoscorepaper/clinvar.csv $HOME/public_html/pathoscorepaper/samocha.csv $HOME/public_html/pathoscorepaper/homsy.csv $HOME/public_html/pathoscorepaper/wigler.csv From 62c5ae5264d695b54a105bccc7b07b35c6d63e48 Mon Sep 17 00:00:00 2001 From: Jim Havrilla Date: Sat, 22 Jun 2019 03:22:51 -0600 Subject: [PATCH 9/9] removed gerp and mtr --- paper/cubarplot.py | 8 -------- paper/evaluate.sh | 28 ++++++++++++++-------------- pathoscore.py | 20 +++++++++++--------- 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/paper/cubarplot.py b/paper/cubarplot.py index 7e375f7..1aad1c1 100644 --- a/paper/cubarplot.py +++ b/paper/cubarplot.py @@ -10,17 +10,9 @@ with open(sys.argv[1], 'r') as clinicaltable: df = pd.read_csv(clinicaltable, sep='\t', index_col=0) df = df.T - print(df) - # header=clinicaltable.readline().strip().split("\t") - # print (header) - # for line in clinicaltable: - # print(line.strip().split("\t")) - ax = df.plot.bar(rot=0,legend=False,width=.8,align='center', fontsize=18) ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize=18) ax.set_ylabel("Clinical Utility", fontsize=18) plt.tight_layout() plt.savefig("".join(sys.argv[1].split(".cu.tsv",)[0])+"cubarplot.pdf", bbox_inches="tight") - -#fig, ax = plt.subplots() diff --git a/paper/evaluate.sh b/paper/evaluate.sh index fa42e13..ec166f9 100644 --- a/paper/evaluate.sh +++ b/paper/evaluate.sh @@ -4,57 +4,57 @@ mkdir -p $HOME/public_html/pathoscorepaper #CLINVAR# ######### -# metrics of choice: VVP, CCR, MPC, CADD, REVEL, RVIS, MCAP, GERP++, MetaSVM, aLoFT_Dominant, MTR, Grantham (chosen based on performance and historical value) +# metrics of choice: VVP, CCR, MPC, CADD, REVEL, RVIS, MCAP, MetaSVM, Grantham (chosen based on performance and historical value) # to get AD variant data and ROCs -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarad -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf adgene.pathogenic.vcf.gz adgene.benign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarad -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf adgene.pathogenic.vcf.gz adgene.benign.vcf.gz # to get AR variant data and ROCs -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarar -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf argene.pathogenic.vcf.gz argene.benign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarar -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf argene.pathogenic.vcf.gz argene.benign.vcf.gz # regular clinvar python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvarall -s CCR -s CADD -s DANN -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s aloft_het -i aloft_lof -i aloft_rec -s fathmm_non -s fathmm_coding -s fitCons -s MetaSVM -s missense_z -s pLI -s phastCons -s polyphen2_hvar -s SIFT -s mis_badness -i BLOSUM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz -python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/clinvar -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf --goi pathogenicgenes.txt pathogenic.vcf.gz benign.vcf.gz # pathogenic filtered clinvar on functional and gnomAD -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarfilter -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.vcf.gz # clinvar 100% gnomad filtered plus functional -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarbenignfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.filter.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarbenignfilter -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.filter.vcf.gz benign.filter.vcf.gz ######### #SAMOCHA# ######### # regular samocha; functional filter doesn't matter, since there are no non-protein-altering variants. -python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/samocha -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf --goi neurodevgenes.txt neurodev.vcf.gz control.vcf.gz +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/samocha -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf --goi neurodevgenes.txt neurodev.vcf.gz control.vcf.gz # samocha benigns, clinvar pathogenics, filtered functionally -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarsamocha -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.vcf.gz control.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarsamocha -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.vcf.gz control.vcf.gz # filtered samocha -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samochafilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf neurodev.filter.vcf.gz control.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/samochafilter -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf neurodev.filter.vcf.gz control.vcf.gz ######### #HOMSY### ######### # regular homsy -python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/homsy -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.vcf.gz hombenign.vcf.gz +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/homsy -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.vcf.gz hombenign.vcf.gz # filtered homsy -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/homsyfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.filter.vcf.gz hombenign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/homsyfilter -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf hompathogenic.filter.vcf.gz hombenign.vcf.gz # homsy benigns, clinvar pathogenics, filtered functionally -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarhomsy -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.vcf.gz hombenign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/clinvarhomsy -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf pathogenic.vcf.gz hombenign.vcf.gz ######### #WIGLER## ######### # regular wigler -python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/wigler -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf wigpathogenic.vcf.gz wigbenign.vcf.gz +python ../pathoscore.py evaluate --prefix $HOME/public_html/pathoscorepaper/wigler -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf wigpathogenic.vcf.gz wigbenign.vcf.gz # filtered wigler -python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/wiglerfilter -s CCR -s CADD -s GERP -s MCAP -s MPC -i MTR -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf wigpathogenic.filter.vcf.gz wigbenign.vcf.gz +python ../pathoscore.py evaluate --functional --prefix $HOME/public_html/pathoscorepaper/wiglerfilter -s CCR -s CADD -s MCAP -s MPC -s REVEL -i RVIS -s VVP -s MetaSVM -s Grantham --suffix pdf wigpathogenic.filter.vcf.gz wigbenign.vcf.gz diff --git a/pathoscore.py b/pathoscore.py index 7f5ea27..99cc845 100644 --- a/pathoscore.py +++ b/pathoscore.py @@ -25,6 +25,8 @@ matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['font.family'] = 'sans-serif' matplotlib.rcParams['font.sans-serif'] = ['Arial'] +matplotlib.rc('xtick', labelsize=16) +matplotlib.rc('ytick', labelsize=16) __version__ = "0.1.3" @@ -384,14 +386,14 @@ def plot(score_methods, scored, unscored, scorable, prefix, title=None, suffix=" ax.set_xlim(-0.004, 1) ax.set_ylim(0, 1) - ax.set_xlabel("False Positive Rate") - ax.set_ylabel("True Positive Rate") + ax.set_xlabel("False Positive Rate", fontsize=16) + ax.set_ylabel("True Positive Rate", fontsize=16) ax2.set_xlim(-0.004, 1) ax2.set_ylim(0, 1) - ax2.set_xlabel("Recall") - ax2.set_ylabel("Precision") - legend = ax.legend(loc="lower right", title="%s (AUC, J index)" % "method", handletextpad=1) - legend = ax2.legend(loc="lower right", title="%s (F1 Score @ Peak J)" % "method", handletextpad=1) + ax2.set_xlabel("Recall", fontsize=16) + ax2.set_ylabel("Precision", fontsize=16) + legend = ax.legend(loc="lower right", title="%s (AUC, J index)" % "method", handletextpad=1, fontsize=12) + legend = ax2.legend(loc="lower right", title="%s (F1 Score @ Peak J)" % "method", handletextpad=1, fontsize=12) if title: plt.title(title) fig.savefig(prefix + ".roc." + suffix) @@ -429,9 +431,9 @@ def plot(score_methods, scored, unscored, scorable, prefix, title=None, suffix=" }) sns.despine() - ax.set_ylabel('J-score') - ax.set_xlabel('Normalized score') - leg = ax.legend(title="method (J-index @ score)", bbox_to_anchor=(1, 1)) + ax.set_ylabel('J-score', fontsize=16) + ax.set_xlabel('Normalized score', fontsize=16) + leg = ax.legend(title="method (J-index @ score)", bbox_to_anchor=(1, 1), fontsize=14) plt.savefig(prefix + ".J." + suffix, bbox_extra_artists=(leg,), bbox_inches='tight') plt.close()