[Bioperl-l] Getting refseq (contigs) from Genbank

Wiepert, Mathieu Wiepert.Mathieu@mayo.edu
Wed, 31 Oct 2001 10:18:31 -0600


Hi,

I was wondering, is it possible to get contigs from genbank, the refseq
data?  I used a test script (right out of the tutorial), to get a sequence
and write it to a file, it worked fine.  I then put in a refseq sequence and
it failed with:

Can't call method "_generic_seqfeature" on an undefined value at
/usr/lib/perl5/site_perl/5.6.0/Bio/SeqIO/genbank.pm line 272.

The following script worked fine, substitute something like NT_004348 for
J00522 and it fails.  The accession number from the genbank file is 
#!/usr/local/bin/perl
use Bio::DB::GenBank;
use Bio::SeqIO;
$gb = new Bio::DB::GenBank();
$seq1 = $gb->get_Seq_by_acc('J00522');
$out = Bio::SeqIO->new('-file' => ">J00522.seq",
                         '-format' => 'FASTA');
$out->write_seq($seq1); 

I gave a half hearted effort to debug, but got lost.  Any errors I made
easily noticed?  Or is refseq data not supported yet?

-Mat