[ensembl-dev] Difficulty finding genomic slices using Ensembl Perl API.

Allan Kamau kamauallan at gmail.com
Sat Mar 12 13:12:55 GMT 2011


On Sat, Mar 12, 2011 at 4:10 PM, Allan Kamau <kamauallan at gmail.com> wrote:
> On Thu, Mar 10, 2011 at 2:09 PM, Allan Kamau <kamauallan at gmail.com> wrote:
>> Dear Ian,
>> Thank you for your reply, I was really stuck. I assume that I may now
>> use the registry you've pointed me to retrieve sequence slices for
>> several species (basically the species mentioned in MirBase.org). Much
>> appreciated.
>>
>> Regards,
>> Allan.
>>
>>
>> On Thu, Mar 10, 2011 at 11:48 AM, ian Longden <ianl at ebi.ac.uk> wrote:
>>> anopheles was moved to ensembl metazoa but the registry code still has
>>> the aliases set up for this ( i will remove these now to avoid any
>>> further confusion)  if you try:-
>>>
>>> $registry->load_registry_from_db(
>>>      -host=>'mysql.ebi.ac.uk',
>>>      -user=>'anonymous',
>>>      -port => 4157);
>>>
>>>
>>> You will be able to find the data you want.
>>>
>>>
>>> -Ian Longden
>>> Ensembl Developer.
>>>
>>> On Wed, Mar 9, 2011 at 8:04 AM, Allan Kamau <kamauallan at gmail.com> wrote:
>>>> I am trying to obtain sections of sequences (and perhaps accompanying
>>>> annotation) of several organisms, for each such request I have the
>>>> following pieces of information.
>>>> 1)species name
>>>> 2)genome build name
>>>> 3)chromosome, scaffold or contig name
>>>> 4)start and end positions
>>>> 5)orientation of the sequence (fwd or rev)
>>>>
>>>> When I query for the above for some species such as
>>>> "anopheles_gambiae" I get no results found in the object
>>>> "@db_adaptors" (see below).
>>>>
>>>>
>>>> use Bio::EnsEMBL::Registry;
>>>>
>>>> my $registry='Bio::EnsEMBL::Registry';
>>>>
>>>> $registry->load_registry_from_db(
>>>>       -host=>'ensembldb.ensembl.org',
>>>>       -user=>'anonymous'
>>>> );
>>>> my @db_adaptors=@{Bio::EnsEMBL::Registry->get_all_DBAdaptors(-species=>"anopheles_gambiae")};
>>>>
>>>> What could I be doing wrong.
>>>>
>>>> The code
>>>>
>>>> $species_name2='Anopheles gambiae';
>>>> $species_name_available=$registry->get_alias($species_name2);
>>>>
>>>> returns
>>>> "anopheles_gambiae"
>>>>
>>>> Meaning that "anopheles_gambiae" is known to ensembl as a species name
>>>> but the outcome of running the preceding code indicates that there are
>>>> no db_adaptors for this species.
>>>>
>>>> Is there a graceful way of obtaining the information I am looking for
>>>> (which I pointed out in the beginning)?
>>>>
>>>> Allan.
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev at ensembl.org
>>>> http://lists.ensembl.org/mailman/listinfo/dev
>>>>
>>>
>>
>


I did try the code using the species "Anophelies gambiae" and
successfully retrieved a sequence slice but the same is not true for
"Aedes aegypti" as shown below.
I have been trying to frantically obtain these sequence slices please help.


species_name2 is:aedes_aegypti, species_name_available is:aedes_aegypti
$VAR1 = undef;
species/group   aedes_aegypti/core
database        aedes_aegypti_core_8_61_1e
host:port       mysql.ebi.ac.uk:4157

species/group   aedes_aegypti/otherfeatures
database        aedes_aegypti_otherfeatures_8_61_1e
host:port       mysql.ebi.ac.uk:4157

species/group   aedes_aegypti/funcgen
database        aedes_aegypti_funcgen_8_61_1e
host:port       mysql.ebi.ac.uk:4157

$str is:supercontig:AaegL1:1
>>>>species_name_available is:'aedes_aegypti', $chromosome_name is:'CH477186.1', $coordinate_system_name is:'chromosome', $highest_available_coordinate_system_name is:'supercontig', assembly_label is:'AaegL1', genome_assembly_name_available is:'AaegL1'
$VAR1 = \\bless( {
                    '_is_multispecies' ='',
                    'db' =bless( {
                                     'seq_region_cache' =bless( {

'id_cache' ={},

'name_cache' ={}
                                                                  },
'Bio::EnsEMBL::Utils::SeqRegionCache' ),
                                     '_is_multispecies' ='',
                                     '_dbc' =bless( {
                                                        'connected8785' =1,
                                                        '_username'
='anonymous',
                                                        '_timeout' =0,
                                                        '_host' =>
'mysql.ebi.ac.uk',
                                                        '_port' =4157,
                                                        '_driver' ='mysql',
                                                        '_query_count' =5,
                                                        '_dbname' =>
'aedes_aegypti_core_8_61_1e',
'db_handle8785' =bless( {}, 'DBI::db' )
                                                      },
'Bio::EnsEMBL::DBSQL::DBConnection' ),
                                     '_species' ='aedes_aegypti',
                                     '_group' ='core',
                                     '_species_id' =1
                                   }, 'Bio::EnsEMBL::DBSQL::DBAdaptor' ),
                    'sr_id_cache' =>
${${$VAR1}}->{'db'}->{'seq_region_cache'}->{'id_cache'},
                    'lrg_region_test' =undef,
                    'dbc' =${${$VAR1}}->{'db'}->{'_dbc'},
                    'sr_name_cache' =>
${${$VAR1}}->{'db'}->{'seq_region_cache'}->{'name_cache'},
                    'species_id' =1
                  }, 'Bio::EnsEMBL::DBSQL::SliceAdaptor' );
Use of uninitialized value $slice in concatenation (.) or string at
src/perl/test__ensembl.pl line 130.
Can't call method "seq" on an undefined value at
src/perl/test__ensembl.pl line 131.




More information about the Dev mailing list