[Bioperl-l] saving amino acids sequence to file
roey.angel
angel at mpi-marburg.mpg.de
Mon Oct 3 17:27:07 UTC 2011
Hi,
I'm trying to save the amino acid sequence from a sequence object I
retrieved from GenBank.
I can easily save the nucleotide sequence with:
my $out_nuc = Bio::SeqIO->new(-format => 'fasta', -file => '>out.nuc');
$out_nuc -> write_seq($seq_object);
And I also managed to extract the amino acid sequence with:
for my $feat_object ($seq_object->get_SeqFeatures) { # obtain
features from seq object
if ($feat_object->primary_tag eq "CDS") { # look for CDS
features
if ($feat_object->has_tag('translation')) { # look for
amino acids
for my $val
($feat_object->get_tag_values('translation')){
}
}
}
}
But is there a way to save that sequence into a file using write_seq or a
similar method?
Thanks in advance,
Roey
--
View this message in context: http://old.nabble.com/saving-amino-acids-sequence-to-file-tp32583843p32583843.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
More information about the Bioperl-l
mailing list