<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000066" bgcolor="#FFFFFF">
Sorry fixed mistake in my previous mail:<br>
<blockquote cite="mid:570381A5.9090304@sistemasgenomicos.com"
type="cite"> Hi Will,<br>
<br>
I had already tried that:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
for my $key (keys $pf->get_all_attributes) {<br>
print "$key\t$pf->get_all_attributes{$key}\n";<br>
}<br>
<br>
associated_gene
Bio::EnsEMBL::Variation::PhenotypeFeature=HASH(0x73c0840)->get_all_attributes{associated_gene}<br>
variation_names
Bio::EnsEMBL::Variation::PhenotypeFeature=HASH(0x73c0840)->get_all_attributes{variation_names}<br>
risk_allele
Bio::EnsEMBL::Variation::PhenotypeFeature=HASH(0x73c0840)->get_all_attributes{risk_allele}<br>
<br>
associated_gene:ISG15 risk_allele:0003
variation_names:rs786201005<br>
<br>
I don't get why get_all_atributes() method only returns,
associated_gene, variation_names and risk_allele. As I wrote on
previous mail I'm able to retrieve the external_reference
($pf->
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<font color="#ff0000"><b>external_reference</b></font>) that
returns the MIM ID (gene) related to this phenotype and not the
Phenotype MIM Number.<br>
<br>
Will could you please check if you only get this three attributes
for this specific variant when using $pf->get_all_attributes?
Could this be a problem related to API or my API local
installation?<br>
<br>
Regards,<br>
Guillermo.<br>
<br>
<div class="moz-cite-prefix">On 05/04/16 10:45, Will McLaren
wrote:<br>
</div>
<blockquote
cite="mid:CAMVEDX1E4=NwB8QaUUan4+MGhJD6z_QumUPnLirMYXi8C0=pGg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi again,
<div><br>
</div>
<div>You can retrieve the MIM ID via fetching the attributes
of the phenotype feature, use get_all_attributes()</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1PhenotypeFeature.html#a7dfa8e10e74e9ede4d87257823ce564e">http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1PhenotypeFeature.html#a7dfa8e10e74e9ede4d87257823ce564e</a><br>
</div>
<div><br>
</div>
<div>Will</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 5 April 2016 at 08:23, Guillermo
Marco Puche <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:guillermo.marco@sistemasgenomicos.com"
target="_blank">guillermo.marco@sistemasgenomicos.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000066" bgcolor="#FFFFFF"> Hi Will,<br>
<br>
Unfortunately I can't use the Phentoype.pm plugin since
I can't support VEP annotation in JSON format at this
moment. <br>
--check_existing and --check_alleles are enabled, for
the feature types I'm using Transcript (I don't know if
this can be the cause of the problem of not being able
to retrieve phenotype ids):<br>
<br>
sub feature_types {<br>
return ['Transcript'];<br>
}<br>
<br>
However with your previous answer and and old e-mail
I've accomplished to retrieve the phenotypes:<br>
<br>
foreach my $known_var(@{$vf->{existing} || []}) {<br>
foreach my
$pf(@{$pfa->fetch_all_by_object_id($known_var->{variation_name})}){<br>
@phenotype_descriptions = ();<br>
if ($pf->source_name =~ /omim/i){<br>
#do stuff with the omim phentoype<br>
push(@phenotype_descriptions,
$pf->phenotype->description)<br>
#trying to retrieve the omim phenotype
id however i can't find a way to<br>
print $pf->external_id,"\n";<br>
#however i can get the external
reference (OMIM gene id)<br>
print $pf->external_reference,"\n";<br>
}<br>
}<br>
<br>
Only problem left I've got is that I can't retrieve the
phenotype id itself (MIM morbid id) in this case it
should be <a moz-do-not-send="true"
href="http://www.omim.org/entry/616126"
target="_blank">616126</a>.<br>
Phentoype description and external reference are
working:<br>
<ul>
<li>The phentoype description:
$pf->phenotype->description (ie:
IMMUNODEFICIENCY 38 WITH BASAL GANGLIA
CALCIFICATION)<br>
</li>
<li>The phentoype external reference (OMIM gene id)
related to this phenotype:
$pf->external_reference (ie: MIM:147571)<br>
</li>
</ul>
<p>For the ClinVar phentoypes I was able to get the
ClinVar id with $pf->external_id however I get
always an <i>undef</i> value for OMIM phenotypes.<br>
</p>
<p>The VCF input record I'm using for testing is the
following one extracted from latest GRCh38: <br>
</p>
<ul>
<li>1 1014143 rs786201005 C T . .
dbSNP_146;TSA=SNV;E_Phenotype_or_Disease;CLIN_pathogenic;AA=C</li>
</ul>
<p> </p>
Regards,<br>
Guillermo.
<div>
<div class="h5"><br>
<br>
<div>On 04/04/16 17:43, Will McLaren wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Guillermo,
<div><br>
</div>
<div>It may be that what you are trying to do is
already encapsulated in our (new to release
84) Phenotypes plugin:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://github.com/Ensembl/VEP_plugins/blob/release/84/Phenotypes.pm"
target="_blank">https://github.com/Ensembl/VEP_plugins/blob/release/84/Phenotypes.pm</a><br>
</div>
<div><br>
</div>
<div>It has the benefit of reducing DB lookups
to a single download the first time you run
it. It's fully configurable to retrieve
phenotypes associated with whatever feature
types (variants, genes etc) you like, as well
as limiting by source. One caveat is that to
get rich data from it you must currently use
JSON output.</div>
<div><br>
</div>
<div>If you wish to continue looking up by
variant in your own plugin, you should enable
co-located variant lookup with
--check_existing (add --check_alleles to match
alleles to your input variants), then you can
use fetch_all_by_object_id() [1] using the
rsIDs in
$tva->variation_feature->{existing},
something like:</div>
<div><br>
</div>
<div>sub run {</div>
<div> my ($self, $tva) = @_;</div>
<div> </div>
<div> ### get phenotype feature adaptor $pfa
somehow</div>
<div> </div>
<div> foreach my $id(map
{$_->{variation_name}}
@{$tva->variation_feature->{existing} ||
[]}) {</div>
<div> my $pfs =
$pfa->fetch_all_by_object_id($id);</div>
<div><br>
</div>
<div> ### do something with the phenotype
features returned</div>
<div> }</div>
<div>}</div>
<div><br>
</div>
<div>Cheers</div>
<div><br>
</div>
<div>Will</div>
<div><br>
</div>
<div>[1] <a moz-do-not-send="true"
href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#a93fcd05eafcf9bae4f9b9a5754904e4c"
target="_blank">http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#a93fcd05eafcf9bae4f9b9a5754904e4c</a></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 4 April 2016 at
16:12, Guillermo Marco Puche <span dir="ltr"><<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:guillermo.marco@sistemasgenomicos.com"><a class="moz-txt-link-abbreviated" href="mailto:guillermo.marco@sistemasgenomicos.com">guillermo.marco@sistemasgenomicos.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div text="#000066" bgcolor="#FFFFFF"> Hello
Will,<br>
<br>
Code in example [1] is working perfectly
for me since I would like to get the
phenotype features related to the variant
and not to the gene. However I don't how
to get $var ( <span>Variation::Variation</span>)
from inside VEP plugin.<br>
I'm trying with $self->{variant} but
I'm getting always an "undef" value.<br>
<br>
Regards,<br>
Guillermo.
<div>
<div><br>
<br>
<div>On 04/04/16 14:50, Will McLaren
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Guillermo,
<div><br>
</div>
<div>The data you refer to has
been retracted from the Ensembl
core database while we resolve
some issues with external
reference mapping between
Ensembl and MIM.</div>
<div><br>
</div>
<div>You should be able to access
the same annotations via the
variation API, using phenotype
features. [1] shows an example
fetching via a variation object,
but you can also query by gene
[2].</div>
<div><br>
</div>
<div>Hope that helps</div>
<div><br>
</div>
<div>Will McLaren</div>
<div>Ensembl Variation</div>
<div><br>
</div>
<div>[1] <a
moz-do-not-send="true"
href="http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#phenotype"
target="_blank"><a class="moz-txt-link-freetext" href="http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#phenotype">http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#phenotype</a></a></div>
<div>[2] <a moz-do-not-send="true"
href="http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#aee2a195b2f6f19952f562511d3ce1a72"
target="_blank">http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#aee2a195b2f6f19952f562511d3ce1a72</a></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 4
April 2016 at 11:46, Guillermo
Marco Puche <span dir="ltr"><<a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:guillermo.marco@sistemasgenomicos.com"><a class="moz-txt-link-abbreviated" href="mailto:guillermo.marco@sistemasgenomicos.com">guillermo.marco@sistemasgenomicos.com</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000066"
bgcolor="#FFFFFF"> Dear
devs,<br>
<br>
Up to VEP version 83 I was
using the following code in
a plugin to retrieve gene
OMIM related information.<br>
<br>
my @db_entries =
@{$gene->get_all_DBEntries()};<br>
foreach my
$db_entry(@db_entries){<br>
if
($db_entry->dbname eq
"MIM_GENE"){<br>
$mim_id =
$db_entry->primary_id;<br>
}<br>
if
($db_entry->dbname eq
"MIM_MORBID"){<br>
push(@mim_morbid_ids,
$db_entry->primary_id);<br>
}<br>
}<br>
<br>
However since I've updated
to VEP 84 I don't get any
MIM_MORBID db_entry
associated to any gene. Has
this been removed or changed
location?<br>
<br>
Best regards,<br>
Guillermo.<br>
<br>
</div>
<br>
_______________________________________________<br>
Dev mailing list <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:Dev@ensembl.org"><a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a></a><br>
Posting guidelines and
subscribe/unsubscribe info: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://lists.ensembl.org/mailman/listinfo/dev"><a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a></a><br>
Ensembl Blog: <a
moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.ensembl.info/"><a class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a></a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Dev mailing list <a moz-do-not-send="true" href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a moz-do-not-send="true" href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a moz-do-not-send="true" href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Dev mailing list <a
moz-do-not-send="true"
href="mailto:Dev@ensembl.org"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a></a><br>
Posting guidelines and subscribe/unsubscribe
info: <a moz-do-not-send="true"
href="http://lists.ensembl.org/mailman/listinfo/dev"
target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a><br>
Ensembl Blog: <a moz-do-not-send="true"
href="http://www.ensembl.info/"
rel="noreferrer" target="_blank">http://www.ensembl.info/</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Dev mailing list <a moz-do-not-send="true" href="mailto:Dev@ensembl.org" target="_blank">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a moz-do-not-send="true" href="http://lists.ensembl.org/mailman/listinfo/dev" target="_blank">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a moz-do-not-send="true" href="http://www.ensembl.info/" target="_blank">http://www.ensembl.info/</a>
</pre>
</blockquote>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Dev mailing list <a moz-do-not-send="true"
href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br>
Posting guidelines and subscribe/unsubscribe info: <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.ensembl.org/mailman/listinfo/dev"><a class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a></a><br>
Ensembl Blog: <a moz-do-not-send="true"
href="http://www.ensembl.info/" rel="noreferrer"
target="_blank">http://www.ensembl.info/</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Dev mailing list <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Dev@ensembl.org">Dev@ensembl.org</a>
Posting guidelines and subscribe/unsubscribe info: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a>
Ensembl Blog: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.ensembl.info/">http://www.ensembl.info/</a>
</pre>
</blockquote>
<div class="moz-signature">
<table border="0" cellpadding="0" align="center">
<tbody>
<tr>
<td><br>
</td>
<td><br>
</td>
</tr>
</tbody>
</table>
<div align="center">
<hr size="2" width="100%" align="center"></div>
</div>
</blockquote>
<br>
<br>
</body>
</html>