[ensembl-dev] Release 65 - 'not a valid species name' exception thrown by get_adaptor()
Giuseppe G.
G.Gallone at sms.ed.ac.uk
Fri Jan 20 12:34:37 GMT 2012
Hi again
I'm on release 65, Bioperl 1.6.1.
A line like the following
my $gene_adaptor = $registry->get_adaptor('ScerS288c', 'core', 'Gene');
will return the exception
-------------------- WARNING ----------------------
MSG: ScerS288c is not a valid species name (check DB and API version)
FILE: Bio/EnsEMBL/Registry.pm LINE: 1159
CALLED BY: Bio/EnsEMBL/Registry.pm LINE: 953
Ensembl API version = 65
---------------------------------------------------
-------------------- EXCEPTION --------------------
MSG: Can not find internal name for species 'ScerS288c'
STACK Bio::EnsEMBL::Registry::get_adaptor
/home/giuseppe/src/ensembl/modules/Bio/EnsEMBL/Registry.pm:955
STACK <MYCODE>
Ensembl API version = 65
---------------------------------------------------
instead of returning an undef.
This happens whenever the query species is not contained in the
genomeDB. So every time I try to get an adaptor with an unrecognised
species (may be a typo, a strain name like Saccharomyces cerevisiae
S288c, etc) I'll get this exception.
The behaviour, up to v64, was different. I got an undefined
$gene_adaptor and I could then go back to the taxon object and climb up
the taxonomy to get the parent taxon (in the example case,
'Saccharomyces cerevisiae') and try once more to get a gene adaptor with
the parent taxon binomial name.
I *could* get round this exception by downloading all of the available
binomal species names from a genome adaptor - comparing my species name
against them, then trying to get the gene adaptor only if my species is
in the genome adaptor array - however this is far from optimal (as I
need to deal with EnsemblGenomes species names as well).
Would it be possible to restore the former behaviour? Thanks a lot!
Giuseppe
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the Dev
mailing list