Question: How To Get Genbank File Using Bioperl
0
gravatar for shilpy
7.3 years ago by
shilpy20
shilpy20 wrote:

I currently have the following:

use Bio::SeqIO;

$seqio_obj = Bio::SeqIO->new(-file => "J01673.gb", -format => "genbank" );
$seq_obj = $seqio_obj->next_seq;

I am not able to get output using above code.

bioperl • 3.1k views
ADD COMMENTlink modified 6.7 years ago by Biostar ♦♦ 20 • written 7.3 years ago by shilpy20
2

That's because none of that code generates any output.

ADD REPLYlink written 7.3 years ago by Neilfws48k

Have you already downloaded the file J01673.gb or are you trying to get BioPerl to download it for you? See Hernan's reply below.

ADD REPLYlink written 7.3 years ago by Peter5.8k
3
gravatar for Hernán
7.3 years ago by
Hernán200
Argentina
Hernán200 wrote:

May be something like:

use Bio::DB::GenBank;
$gb = new Bio::DB::GenBank(-retrievaltype => 'tempfile' , -format => 'gb');
$seqio_object = $gb->get_Stream_by_id(['J00522']);
while( my $seq = $seqio_object->next_seq ) {
    $seqio_object->write_seq($seq);}
ADD COMMENTlink modified 7.3 years ago • written 7.3 years ago by Hernán200
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1609 users visited in the last hour