[ensembl-dev] Gene adaptor when the species is unknown]

Glenn Proctor glenn at ebi.ac.uk
Wed Jun 29 14:05:46 BST 2011


Hi Sebastien

You may also be able to make use of the get_species_and_object_type()
method in the Registry which will take a stable ID and return an array
consisting of the species name, object type, and database type

The link below should (hopefully) take you to the documentation on the method:

http://test.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1Registry.html#a9d6140dd489c09e7d11f50f499496c99

Glenn.

On Wed, Jun 29, 2011 at 1:13 PM, Susan Fairley <sf7 at sanger.ac.uk> wrote:
> Hi Sebastien,
>
> Yes, you do need to specify the database you want to connect to.
>
> It should be the database that the genes are stored in, also specifying the
> dnadb if the sequence is stored elsewhere and you want sequences.
>
> Regards,
> Susan.
>
> Sébastien Moretti wrote:
>>
>> Thanks for this alternative method.
>>
>> Nevertheless it seems I still need a species name somewhere:
>> - with the -species argument
>> - or with the -dbname argument that, I guess, should be the species
>>  core database name.
>>
>> Isn't it ?
>>
>>> Hi Sebastien,
>>>
>>> If you have a DBAdaptor you can then get a gene adaptor without
>>> mentioning the species.
>>>
>>> my $genedb = new Bio::EnsEMBL::DBSQL::DBAdaptor( -host => $gene_host,
>>> -user => $gene_user,
>>> -pass => $gene_pass,
>>> -port => $gene_port,
>>> -dbname => $gene_dbname);
>>>
>>>
>>> my $ga = $genedb->get_GeneAdaptor();
>>>
>>> Hope this helps.
>>>
>>> Regards,
>>> Susan.
>>>
>>>
>>> Sébastien Moretti wrote:
>>>>
>>>> Hi,
>>>> I wonder if there is another way to create a gene adaptor.
>>>> I use that but it is linked to a particular species:
>>>> my $gene_adaptor = $reg->get_adaptor( 'Human', 'Core', 'Gene' );
>>>>
>>>>
>>>> I would like to get information about genes from ensembl gene
>>>> identifiers (stable_id) without knowing a priori the species.
>>>> I.e. what I have to put in the 'Human' place.
>>>>
>>>>
>>>> So, is there something more generic to create gene adaptor ?
>>>>
>>>> Best regards
>>
>
> _______________________________________________
> Dev mailing list    Dev at ensembl.org
> List admin (including subscribe/unsubscribe):
> http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
>
>




More information about the Dev mailing list