[ensembl-dev] How to check which Human genome build?

Andrew Yates ayates at ebi.ac.uk
Tue Feb 16 13:08:48 GMT 2016

Hi Chris,

The patched current and last GRCh37 databases are only available on port 3337. Using port 3306 sends you to the database that was used on the live site i.e. anything from release 76 onwards this will be GRCh38. Should you wish to fix your API version to the last archive release of GRCh37 you can use API version 75 and port number 3306.

You can use the code snippet to see how the API can report what the default assembly version is for a database:


#!/usr/bin/env perl

use strict;
use warnings;
use Bio::EnsEMBL::Registry;
my $port = @ARGV ? $ARGV[0] : 3306; # switch port from the command line
  -HOST => 'ensembldb.ensembl.org', -PORT => $port, -USER => 'anonymous'

warn Bio::EnsEMBL::Registry->get_adaptor('human', 'core', 'genomecontainer')->get_version();


Here's the output from my command line just now:

ayates at ayatesmba-2:~/Code/ensembl/ensembl (release/83=)$ perl ping_version.pl
GRCh38 at ping_version.pl line 11.
ayates at ayatesmba-2:~/Code/ensembl/ensembl (release/83=)$ perl ping_version.pl 3337
GRCh37 at ping_version.pl line 11.

Hope this helps & any problems please get back in touch


Andrew Yates - Genomics Technology Infrastructure Team Leader
The European Bioinformatics Institute (EMBL-EBI)
Wellcome Genome Campus
Hinxton, Cambridge
CB10 1SD, United Kingdom
Tel: +44-(0)1223-492538
Fax: +44-(0)1223-494468
Skype: andy.yates.ebi

> On 16 Feb 2016, at 12:23, Christian Cole (Staff) <C.Cole at dundee.ac.uk> wrote:
> Hi,
> I've just noticed that the GRCh37 perl API connection is only maintained for the current and previous release. Connecting to the GRCh37 port of 3306 on any other releases gives you GRCh38 data with no warning.
> How do I find out explicitly which human genome build I'm using without assuming the port connection gives me what I want?
> Also, would it be possible to report a warning that although I'm connecting to port 3306 via an older release, the data is still GRCh38?
> Many thanks,
> Chris
> --
> Dr Christian Cole
> Co-ordinator, The Data Analysis Group
> The Barton Group
> Division of Computational Biology, School of Life Sciences,
> University of Dundee, Dundee, UK.
> Tel:+44 1382 388721
> http://www.compbio.dundee.ac.uk/dag.html <http://www.compbio.dundee.ac.uk/dag.html>
> twitter: @drchriscole
> ORCID: http://europepmc.org/authors/0000-0002-2560-2484 <http://europepmc.org/authors/0000-0002-2560-2484>
> The University of Dundee is a registered Scottish Charity, No: SC015096
> _______________________________________________
> 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/20160216/f31ac432/attachment.html>

More information about the Dev mailing list