How To Get Genbank File Using Bioperl
1
0
Entering edit mode
11.1 years ago
shilpy ▴ 20

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 • 4.0k views
ADD COMMENT
2
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
3
Entering edit mode
11.1 years ago
Hernán ▴ 220

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 COMMENT

Login before adding your answer.

Traffic: 2507 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