[ensembl-dev] Variant external references: MIM_MORBID

Will McLaren wm2 at ebi.ac.uk
Mon Apr 4 16:43:25 BST 2016


Hi Guillermo,

It may be that what you are trying to do is already encapsulated in our
(new to release 84) Phenotypes plugin:

https://github.com/Ensembl/VEP_plugins/blob/release/84/Phenotypes.pm

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.

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:

sub run {
  my ($self, $tva) = @_;

  ### get phenotype feature adaptor $pfa somehow

  foreach my $id(map {$_->{variation_name}}
@{$tva->variation_feature->{existing} || []}) {
    my $pfs = $pfa->fetch_all_by_object_id($id);

    ### do something with the phenotype features returned
  }
}

Cheers

Will

[1]
http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#a93fcd05eafcf9bae4f9b9a5754904e4c

On 4 April 2016 at 16:12, Guillermo Marco Puche <
guillermo.marco at sistemasgenomicos.com> wrote:

> Hello Will,
>
> 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 ( Variation::Variation) from inside VEP plugin.
> I'm trying with  $self->{variant} but I'm getting always an "undef" value.
>
> Regards,
> Guillermo.
>
>
> On 04/04/16 14:50, Will McLaren wrote:
>
> Hi Guillermo,
>
> 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.
>
> 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].
>
> Hope that helps
>
> Will McLaren
> Ensembl Variation
>
> [1]
> http://www.ensembl.org/info/docs/api/variation/variation_tutorial.html#phenotype
> [2]
> http://www.ensembl.org/info/docs/Doxygen/variation-api/classBio_1_1EnsEMBL_1_1Variation_1_1DBSQL_1_1PhenotypeFeatureAdaptor.html#aee2a195b2f6f19952f562511d3ce1a72
>
> On 4 April 2016 at 11:46, Guillermo Marco Puche <
> guillermo.marco at sistemasgenomicos.com> wrote:
>
>> Dear devs,
>>
>> Up to VEP version 83 I was using the following code in a plugin to
>> retrieve gene OMIM related information.
>>
>>     my @db_entries = @{$gene->get_all_DBEntries()};
>>     foreach my $db_entry(@db_entries){
>>         if ($db_entry->dbname eq "MIM_GENE"){
>>             $mim_id = $db_entry->primary_id;
>>         }
>>         if ($db_entry->dbname eq "MIM_MORBID"){
>>             push(@mim_morbid_ids, $db_entry->primary_id);
>>         }
>>     }
>>
>> 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?
>>
>> Best regards,
>> Guillermo.
>>
>>
>> _______________________________________________
>> Dev mailing list    Dev at ensembl.org
>> Posting guidelines and subscribe/unsubscribe info:
>> <http://lists.ensembl.org/mailman/listinfo/dev>
>> http://lists.ensembl.org/mailman/listinfo/dev
>> Ensembl Blog: http://www.ensembl.info/
>>
>>
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20160404/2b84f4d2/attachment.html>


More information about the Dev mailing list