[Bioperl-l] Getting refseq (contigs) from Genbank
Jason Eric Stajich
jason@cgt.mc.duke.edu
Wed, 31 Oct 2001 11:35:24 -0500 (EST)
Sigh.
Been down this road - I think if you specify -format => 'fasta' in
DB::Genbank initialization. See the DB::GenBank documentation but it is
something like
my $db = new Bio::DB::GenBank(-format => 'Fasta');
my $seq = $db->get_Seq_by_acc('NT_004348');
If someone would go through and catalog the available retrieval methods
via the web with NCBI CGI parameters we can do a better job here.
-jason
On Wed, 31 Oct 2001, Wiepert, Mathieu wrote:
> 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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason@cgt.mc.duke.edu