[ensembl-dev] Genome build

mr6 at ebi.ac.uk mr6 at ebi.ac.uk
Fri Jul 20 10:25:00 BST 2012


Hi Daniel,

To complement Thibaut's answer, the meta table contains most information
you could be interested in about the assembly and build versions used.

Using the AssemblyInfoAdaptor in the perl API, you can use the fetch_info
method which will return a hash containing most of that information, like
'assembly.name', 'assembly.date' or 'genebuild.method'.

Your code could look something like this :

my $info = Bio::EnsEMBL::Registry->get_adaptor($self->param('species'),
'core', 'AssemblyInfo')->fetch_info();

my $assembly_name = $info->{'assembly.name'};

Please note that the meta table also contains the 'assembly.accession'
which will point to the official accession id, but this is not yet
supported by the API.


Regards,
Magali


> Hi Daniel,
> If you want the assembly version here is some code:
> my ($highest_cs)
> =$db->get_CoordSystemAdaptor-><http://www.ensembl.org/info/docs/Doxygen/core-api/classBio_1_1EnsEMBL_1_1DBSQL_1_1BaseAdaptor.html#aaaeb07304823b065e6ed47e3723b0e47>fetch_all()};
> my $assembly = $highest_cs->version();
>
> For human it will return "GRCh37"
>
> Regards
> Thibaut
>
>
>
> On 19/07/12 23:54, Daniel Cuevas wrote:
>> Hi to all,
>>
>> Is it possible to obtain information about the genome build or the
>> assembly release from the database using the Perl API? I just need to
>> know which one is actually using. Is this information in the database?
>>
>> Thank you in advance,
>> Daniel
>>
>>
>> _______________________________________________
>> 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/
>
> _______________________________________________
> 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