[Bioperl-l] Errors with Bio::Seq objects
De-Jian Zhao
dejian.zhao at gmail.com
Wed Jul 11 17:31:37 UTC 2012
Hi,
I downloaded a nucleotide sequence from Genbank (file name: nt.gb) and
tested the Bio::SeqIO module as follows. The first 3 commands succeeded;
however the last 2 failed.
I think $seqio->next_seq() produces a Bio::Seq object which contains the
sequence, features and annotation (according to the DESCRIPTION of
"perldoc Bio::Seq") and thus the invocation of the methods
get_SeqFeatures() and translate() should be valid. However, the results
denied this idea.
Will anyone explain what happened to the last 2 commands? I have
encountered numerous cases of failures when testing the bioperl methods.
I want to translate the mRNA sequence and extract the sequence features.
What are the right commands? Thanks a lot!
Best,
Dejian
PS: The commands and results
$ perl -e ' use Bio::SeqIO; my $seqio=Bio::SeqIO->new(-file=>shift);
print $seqio->next_seq()->display_id(); ' nt.gb
NM_053056
$ perl -e ' use Bio::SeqIO; my $seqio=Bio::SeqIO->new(-file=>shift);
print $seqio->next_seq()->molecule(); ' nt.gb
mRNA
$ perl -e ' use Bio::SeqIO; my $seqio=Bio::SeqIO->new(-file=>shift);
print $seqio->next_seq()->subseq(1,6); ' nt.gb
CACACG
$ perl -e ' use Bio::SeqIO; my $seqio=Bio::SeqIO->new(-file=>shift);
print $seqio->next_seq()->get_SeqFeatures(); ' nt.gb
Bio::SeqFeature::Generic=HASH(0x20a30898)Bio::SeqFeature::Generic=HASH(0x20a30bb0)Bio::SeqFeature::Generic=HASH(0x20a30cd0)Bio::SeqFeature::Generic=HASH(0x20a317b0)Bio::SeqFeature::Generic=HASH(0x20a31720)Bio::SeqFeature::Generic=HASH(0x20a39a18)Bio::SeqFeature::Generic=HASH(0x20a317e0)Bio::SeqFeature::Generic=HASH(0x20a398b0)Bio::SeqFeature::Generic=HASH(0x20a39838)Bio::SeqFeature::Generic=HASH(0x20a39e98)Bio::SeqFeature::Generic=HASH(0x20a3b898)Bio::SeqFeature::Generic=HASH(0x20a3a120)Bio::SeqFeature::Generic=HASH(0x20a3bda8)Bio::SeqFeature::Generic=HASH(0x20a3c030)Bio::SeqFeature::Generic=HASH(0x20a3c2b8)Bio::SeqFeature::Generic=HASH(0x20a3be20)Bio::SeqFeature::Generic=HASH(0x20a3c0a8)Bio::SeqFeature::Generic=HASH(0x20a3bb98)Bio::SeqFeature::Generic=HASH(0x20a3c300)Bio::SeqFeature::Generic=HASH(0x20a3c588)Bio::SeqFeature::Generic=HASH(0x20a3d838)Bio::SeqFeature::Generic=HASH(0x20a3dfb8)Bio::SeqFeature::Generic=HASH(0x20a3dd18)
$ perl -e ' use Bio::SeqIO; my $seqio=Bio::SeqIO->new(-file=>shift);
print $seqio->next_seq()->translate(); ' nt.gb
Bio::Seq::RichSeq=HASH(0x20a3e7b0)
More information about the Bioperl-l
mailing list