Error In Bioperl Get Adaptor
1
1
Entering edit mode
12.6 years ago
Davy ▴ 410

I'm pretty new to perl (like about 5 hours new!) so I've no idea what I've done wrong here. Perhaps it's something to do with my install, but I am trying to get some seqeunce data from ensembl using the Perl API.

This code is copied directly from ensembls core API tutorial, and yet throws an error:

#!C:/Perl64/
use Bio::EnsEMBL::Registry;

my $registry = 'Bio::EnsEMBL::Registry';

$registry->load_registry_from_db(
    -host => 'ensembldb.ensembl.org', # alternatively 'useastdb.ensembl.org'
    -user => 'anonymous'
);
my $slice_adaptor = $registry->get_adaptor( 'Human', 'Core', 'Slice' );
my $slice = $slice_adaptor->fetch_by_gene_stable_id( 'ENSG00000099889', 5e3 );
my $sequence = $slice->seq();
print $sequence;

I just wanted to get the sequence for one gene first to test and then build up from there this didn't work. The error was:

Replacement list is longer than search list at C:/Perl64/site/lib/Bio/Range.pm line 251.
UNIVERSAL->import is deprecated and will be removed in a future perl at C:/Perl64/site/lib/Bio/Tree/TreeFunctionsI.pm line 94

Any ideas?
Cheers,
Davy

p.s. I don't really know perl at all so if anyone can suggest a way to do this using python or R that would be great. I tried using bioconductor's biomaRt, but approximately 1/3 of the seqeunces I query for are returned as "Sequence unavailable".

edited to add version Info:

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Davy>perl --version

This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x64-multi-thread (with 8 registered patches, see perl -V for more detail)

Copyright 1987-2010, Larry Wall

Binary build 1202 [293621] provided by ActiveState http://www.ActiveState.com Built Sep 6 2010 22:53:42

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/ the Perl Home Page.

bioperl ensembl api • 4.9k views
ADD COMMENT
1
Entering edit mode

It might be a version problem. I see you are on possibly on windows, but still the first line makes no sense to me, so please provide the perl version information, 'perl --version' should do this. Also the output looks like warnings not errors to me. Did you check this identifier is valid?

ADD REPLY
0
Entering edit mode

Hi Michael, Version info added above. Yes I am on windows. You're right they are warnings, apologies for not differentiating, nevertheless, the scripts exits with no other output. The identifier is indeed valid, points to ARVCF gene. Thanks!

ADD REPLY
1
Entering edit mode

Ok, the only thing I can do is check it out, but I am travelling, so maybe somebody else will be faster. I'll check it once I am back.

ADD REPLY
0
Entering edit mode

Can you post an example Ensembl Gene ID which gives "sequence unavailable" using biomaRt?

ADD REPLY
0
Entering edit mode

I think this might be ActiveState release related? Personally, I would use Strawberry Perl if running on Windows :) Have you looked at PyCogent, it has EnsEMBL support, albeit not as detailed as the Perl API.

ADD REPLY
2
Entering edit mode
12.6 years ago
Bert Overduin ★ 3.7k

Hi,

Your script works perfectly fine for me (although I deleted the #!C:/Perl64/ part), so the fault must lie with your install. Have you made sure you have the right versions of Perl, BioPerl and the Ensembl APIs installed (see also the installation instructions)?

With regard to the 'sequence unavailable' using biomaRt, I can understand this in case you are retrieving protein sequences, as there are quite some Ensembl transcripts without a protein product. In these cases you should indeed get 'sequence unavailable' returned instead of a sequence. However, from the first part of your question I gather you are retrieving gene sequences, right? In that case, have you checked the current Ensembl website for these Gene IDs?

As far as I know there is no Python API for Ensembl. biomaRt is indeed another option, but you should realize that the BioMart databases don't contain all data that are in the Ensembl databases, so you may need the Ensembl Perl API after all. You can learn the level of Perl you need to be able to use the Ensembl Perl APIs within a day. On the website of Sofia Robb you can find a very good introduction to Perl.

Hope this helps.

ADD COMMENT
0
Entering edit mode

There is an old version of an EnsEMBL API built into PyGr (though it isn't fully functional), however PyCogent has quite a decent EnsEMBL API. There is also Jan Aerts' Ruby EnsEMBL API. None of them, however, are as rich as the Perl EnsEMBL API.

ADD REPLY

Login before adding your answer.

Traffic: 2332 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6