Skip to content

Instantly share code, notes, and snippets.

@hyphaltip
Created September 8, 2009 19:40
Show Gist options
  • Save hyphaltip/183169 to your computer and use it in GitHub Desktop.
Save hyphaltip/183169 to your computer and use it in GitHub Desktop.
# would be additional tests in t/LocalDB/DBFasta.t
# test out writing the Bio::PrimarySeq::Fasta objects with SeqIO
$db = Bio::DB::Fasta->new($test_dbdir, -reindex => 1);
my $out = Bio::SeqIO->new(-format => 'genbank');
# works
$primary_seq = Bio::Seq->new(-primary_seq => $db->get_Seq_by_acc('AW057119'));
# fails
#$primary_seq = $db->get_Seq_by_acc('AW057119');
eval {
warn(ref($primary_seq),"\n");
$out->write_seq($primary_seq)
};
ok(!$@);
$out = Bio::SeqIO->new(-format => 'embl');
eval {
$out->write_seq($primary_seq)
};
ok(!$@);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment