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.
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?
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!
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.
Can you post an example Ensembl Gene ID which gives "sequence unavailable" using biomaRt?
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.