[Bioperl-l] [Quick help needed] Getting Organism info using NCBI Accession numbers : sample code included

Joel Martin j_martin at lbl.gov
Wed Apr 20 20:15:36 UTC 2011


ftp://ftp.ncbi.nih.gov/genbank/README.genbank

look in there for Genbank Livelists, for doing many lookups it will be
much faster and kinder to ncbi if you use those.

Joel

On Wed, Apr 20, 2011 at 10:21 AM, shalabh sharma
<shalabh.sharma7 at gmail.com> wrote:
> Hey Abhishek,
>                I think you can use this:
> http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook#I_want_a_list_of_database_.27x.27_UIDs_that_are_linked_from_a_list_of_database_.27y.27_UIDs
>
> Also there are few files maintained by refseq that can convert accession to
> GIs.
>
> -Shalabh
>
>
> On Wed, Apr 20, 2011 at 1:14 PM, Abhishek Pratap <abhishek.vit at gmail.com>wrote:
>
>> Hi John
>>
>> Thanks for your reply. I think your code does exactly what I needed. In
>> batch cases it runs a bit slow but still able to fetch lineage using NCBI
>> Accession.
>>
>> FYI : I love the speed of Bio::LITE::Taxonomy but it only works on NCBI GI.
>>
>> So I am wondering if I can convert Accession -> GI quickly then I can get
>> my
>> results far more faster.
>>
>> -Abhi
>>
>> On Mon, Apr 18, 2011 at 10:30 AM, John SJ Anderson <genehack at genehack.org
>> >wrote:
>>
>> > On Fri, Apr 15, 2011 at 18:39, Abhishek Pratap <abhishek.vit at gmail.com>
>> > wrote:
>> >
>> > > I want to seach NCBI for Locus name "CP000490" and get the organism
>> > lineage
>> >
>> > Maybe this will at least get you started:
>> >
>> > #! /opt/perl/bin/perl
>> >
>> > use strict;
>> > use warnings;
>> > use 5.010;
>> >
>> > use Bio::DB::GenBank;
>> >
>> > my @ids = qw( NW_001884661 EZ361133 CP000490 );
>> > my $gbh = Bio::DB::GenBank->new();
>> >
>> > foreach my $id( @ids ) {
>> >  say "* ID: $id";
>> >  my $seq = $gbh->get_Seq_by_acc( $id );
>> >  my $org = $seq->species;
>> >  say join ' ' , $org->classification , "\n";
>> > }
>> >
>> >
>> > j.
>> >
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>
>
>
>
> --
> Shalabh Sharma
> Scientific Computing Professional Associate (Bioinformatics Specialist)
> Department of Marine Sciences
> University of Georgia
> Athens, GA 30602-3636
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>




More information about the Bioperl-l mailing list