<div dir="ltr">Hi Will, sorry to fork this thread. Do you have any immediate plans to write a VEP plugin that will poop out all this phenotype information into a nicely organized JSON? That will be super useful for web front-ends like cBioPortal. If not, we plan to do this by mid-December, and submit a pull request to <a href="https://github.com/ensembl-variation/VEP_plugins">https://github.com/ensembl-variation/VEP_plugins</a><div><br></div><div>Thanks,</div><div>Cyriac</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 10, 2015 at 5:06 AM, Will McLaren <span dir="ltr"><<a href="mailto:wm2@ebi.ac.uk" target="_blank">wm2@ebi.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jessica,<div><br></div><div>Here's a way you can get the phenotype names in VEP without me writing any new code!</div><div><br></div><div>1) Create a BED file from Ensembl's database of phenotype annotations. This will take a few minutes:</div><div><br></div><div>mysql -<a href="http://hensembldb.ensembl.org" target="_blank">hensembldb.ensembl.org</a> -uanonymous -Dhomo_sapiens_variation_82_38 -e'select <a href="http://sr.name" target="_blank">sr.name</a>, pf.seq_region_start-1,pf.seq_region_end, concat("\"", concat_ws(":", pf.type, <a href="http://s.name" target="_blank">s.name</a>, pf.object_id, p.description), "\"") from seq_region sr, source s, phenotype p, phenotype_feature pf where pf.seq_region_id = sr.seq_region_id and pf.source_id = s.source_id and pf.phenotype_id = p.phenotype_id' | grep -v concat_ws | sort -k1,1 -k2,2n -k3,3n | bgzip -c > phenotypes.bed.gz<br></div><div><br></div><div>2) Index it with tabix:</div><div><br></div><div>tabix -p bed phenotypes.bed.gz</div><div><br></div><div>3) Use it as a custom annotation in VEP (see <a href="http://www.ensembl.org/info/docs/tools/vep/script/vep_custom.html" target="_blank">http://www.ensembl.org/info/docs/tools/vep/script/vep_custom.html</a>):</div><div><br></div><div>echo "rs533747784" | perl <a href="http://variant_effect_predictor.pl" target="_blank">variant_effect_predictor.pl</a> -force -cache -custom phenotypes.bed.gz,phenotypes,bed,overlap<br></div><div><br></div><div>Then have fun parsing the output :-)</div><div><br></div><div>You could change the MySQL query above to limit it to one source of data, or remove the structural variants for example (there are a lot of them and they tend to overlap a significant portion of the genome).</div><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Will</div><div><br></div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 9 November 2015 at 19:45, JESSICA X. CHONG <span dir="ltr"><<a href="mailto:jxchong@uw.edu" target="_blank">jxchong@uw.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Could you maybe consider making it an option to output the phenotype names? At least for me, in most cases, if I’m dealing with a small number of samples/variants, it’s much more useful to be able to see the phenotype names within the output file rather than
 have to see a “1” and then have to start searching each of the individual phenotype sources (OMIM, clinvar, DDG2P, etc etc etc) to figure out which database had a phenotype for the gene and maybe the phenotype might not even be relevant. 
<div><br>
</div>
<div>The GEMINI developers were considering adding this as a feature (<a href="https://github.com/arq5x/gemini/issues/571" target="_blank">https://github.com/arq5x/gemini/issues/571</a>) but obviously it’s much better to rely on VEP to do this when VEP is
 so close to already having this implemented.</div>
<div><br>
</div>
<div>Thanks again,</div>
<div>Jessica<div><div><br>
<div><br>
</div>
<div><br>
<div>
<blockquote type="cite">
<div>On Nov 9, 2015, at 9:41 AM, JESSICA X. CHONG <<a href="mailto:jxchong@uw.edu" target="_blank">jxchong@uw.edu</a>> wrote:</div>
<br>
<div><span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Hi
 Will,</span>
<div style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<br>
<div>
<blockquote type="cite">
<div>On Nov 9, 2015, at 1:44 AM, Will McLaren <<a href="mailto:wm2@ebi.ac.uk" target="_blank">wm2@ebi.ac.uk</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Hi Jessica,
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 9 November 2015 at 00:20, Jessica Chong<span> </span><span dir="ltr"><<a href="mailto:jxchong@uw.edu" target="_blank">jxchong@uw.edu</a>></span><span> </span>wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I am trying to use the --gene_phenotype option in VEP v82 but I am having problems.<br>
<br>
1) if a variant is in a gene that is associated with a particular phenotype (e.g. CFTR and cystic fibrosis), where does this information get stored in the resulting annotated vcf? I don’t see a corresponding field name listed as a possible extras column output
 on this page<span> </span><a href="http://uswest.ensembl.org/info/docs/tools/vep/vep_formats.html#output" rel="noreferrer" target="_blank">http://uswest.ensembl.org/info/docs/tools/vep/vep_formats.html#output</a></blockquote>
<div><br>
</div>
<div>The phenotype name does not get stored in the output. Firstly, many phenotype names are long and contain odd characters that can break file format encoding. Secondly, many genes and/or variants have several phenotypes associated with them, so
 to list all of them (and multiple times in the case where you are reporting e.g. the same gene multiple times) would cause the output file size to increase hugely.</div>
<div><br>
</div>
<div>Example for CFTR: <a href="http://www.ensembl.org/Homo_sapiens/Gene/Phenotype?g=ENSG00000001626" target="_blank">http://www.ensembl.org/Homo_sapiens/Gene/Phenotype?g=ENSG00000001626</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Ok, I see. Thanks.</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
2) if a variant itself is associated with a particular “phenotype, disease, or trait” then my understanding from the VEP output documentation is that I should expect this information to show up under the PHENO field?<br>
</blockquote>
<div><br>
</div>
<div>I don't think this is stated anywhere in the documentation. <a href="http://www.ensembl.org/info/docs/tools/vep/vep_formats.html#output" target="_blank">http://www.ensembl.org/info/docs/tools/vep/vep_formats.html#output</a><span> </span>shows
 the output fields and their descriptions.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>
<div>Ahhh, ok. Because GENE_PHENO isn’t listed in the VEP documentation as a possible output field, the closest I could find was “PHENO,” so I was just guessing.</div>
<div><br>
</div>
</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I tried annotating a tiny vcf that just includes a variant in CFTR (and the variant is dF508, so it is definitely pathogenic and CFTR should certainly be associated with a phenotype as well on the gene level) but PHENO is always blank (and I don’t see any field
 mentioning cystic fibrosis as a phenotype/disease name).<br>
</blockquote>
<div><br>
</div>
<div>Apologies, there seems to be an issue with the v82 caches in that they are missing the necessary information to populate the fields for --gene_phenotype. However, the field you want is GENE_PHENO, which should show a binary flag indicating whether
 the gene is associated with a phenotype.</div>
<div><br>
</div>
<div>I will look into why this information is missing.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Thanks!</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div>Will McLaren</div>
<div>Ensembl Variation</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
Here is what I ran:<br>
perl variant_effect_predictor/<a href="http://variant_effect_predictor.pl/" rel="noreferrer" target="_blank">variant_effect_predictor.pl</a><span> </span>\<br>
-i CFTR.VT.vcf \<br>
-o CFTR.VT.VEP.vcf \<br>
--vcf --offline --cache \<br>
--dir_cache variant_effect_predictor/cache/ \<br>
--species homo_sapiens --assembly GRCh37 \<br>
--fasta Homo_sapiens_assembly19.fasta \<br>
--fork 8 --force_overwrite \<br>
--compress 'gunzip -c' \<br>
--sift b --polyphen b --symbol --numbers --biotype \<br>
--total_length --canonical --ccds --hgvs --shift_hgvs 1 --gene_phenotype \<br>
--fields Consequence,Codons,Amino_acids,Gene,SYMBOL,Feature,EXON,PolyPhen,SIFT,Protein_position,BIOTYPE,CANONICAL,CCDS,HGVSc,HGVSp,PHENO<br>
<br>
<br>
The resulting vcf contains these lines:<br>
##VEP=v82 cache=/ensembl-tools/82/Linux/RHEL6/x86_64/variant_effect_predictor/cache//homo_sapiens/82_GRCh37 db=. polyphen=2.2.2 sift=sift5.2.2 COSMIC=71 ESP=20141103 gencode=GENCODE 19 HGMD-PUBLIC=20152 genebuild=2011-04 regbuild=13 assembly=GRCh37.p13 dbSNP=144
 ClinVar=201507<br>
##INFO=<ID=CSQ,Number=.,Type=String,Description="Consequence annotations from Ensembl VEP. Format: Consequence|Codons|Amino_acids|Gene|SYMBOL|Feature|EXON|PolyPhen|SIFT|Protein_position|BIOTYPE|CANONICAL|CCDS|HGVSc|HGVSp|PHENO”><br>
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  sample1A3       sample1A4       sample1A5       sample1A6       sample1A7       sample1A8       sample1A3       sample1A4       sample1A5       sample1A6       sample1A7       sample1A8<br>
7       117199644       rs199826652     ATCT    A       3996.41 PASS    AC=4;AF=0.023;AN=24;BaseQRankSum=-0.941;ClippingRankSum=-0.033;DB;DP=7203;FS=2.556;InbreedingCoeff=-0.0257;MLEAC=5;MLEAF=0.023;MQ0=0;MQ=60.36;MQRankSum=0.129;QD=21.37;ReadPosRankSum=0.673;SOR=0.921;VQSLOD=1.51;culprit=SOR;CSQ=downstream_gene_variant|||ENSG00000232661|AC000111.3|ENST00000441019|||||antisense|YES||||,inframe_deletion|aTCTtt/att|IF/I|ENSG00000001626|CFTR|ENST00000426809|10/26|||477-478/1438|protein_coding|||ENST00000426809.1:c.1431_1433delCTT|ENSP00000389119.1:p.Phe478del|,inframe_deletion|aTCTtt/att|IF/I|ENSG00000001626|CFTR|ENST00000454343|10/26|||446-447/1419|protein_coding|||ENST00000454343.1:c.1338_1340delCTT|ENSP00000403677.1:p.Phe447del|,inframe_deletion|aTCTtt/att|IF/I|ENSG00000001626|CFTR|ENST00000003084|11/27|||507-508/1480|protein_coding|YES|CCDS5773.1|ENST00000003084.6:c.1521_1523delCTT|ENSP00000003084.6:p.Phe508del|,upstream_gene_variant|||ENSG00000001626|CFTR|ENST00000472848|||||processed_transcript||||| 
      GT:AD:DP:GQ:PL  0/0:4,0:4:9:0,9,135     0/0:10,0:10:24:0,24,360 0/0:3,0:3:5:0,5,86      0/1:10,12:22:99:441,0,474       0/1:9,18:27:99:729,0,424        0/0:23,0:23:63:0,63,945 0/0:22,0:22:66:0,66,714 0/0:33,0:33:84:0,84,1096        0/0:22,0:22:62:0,62,736
 0/1:17,14:31:99:537,0,881       0/1:13,16:29:99:620,0,632       0/0:24,0:24:60:0,60,791<br>
<br>
<br>
Thanks!<br>
_______________________________________________<br>
Dev mailing list   <span> </span><a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info:<span> </span><a href="http://lists.ensembl.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog:<span> </span><a href="http://www.ensembl.info/" rel="noreferrer" target="_blank">http://www.ensembl.info/</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info:<span> </span><a href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog:<span> </span><a href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a><br>
</div>
</blockquote>
</div>
<br>
</div>
<span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Dev
 mailing list    </span><a href="mailto:Dev@ensembl.org" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">Dev@ensembl.org</a><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Posting
 guidelines and subscribe/unsubscribe info:<span> </span></span><a href="http://lists.ensembl.org/mailman/listinfo/dev" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Ensembl
 Blog:<span> </span></span><a href="http://www.ensembl.info/" style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://www.ensembl.info/</a></div>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" rel="noreferrer" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Dev mailing list    <a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a href="http://lists.ensembl.org/mailman/listinfo/dev" rel="noreferrer" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a href="http://www.ensembl.info/" rel="noreferrer" target="_blank">http://www.ensembl.info/</a><br>
<br></blockquote></div><br></div>