7 bp_translate_seq - translates a sequence
11 bp_translate_seq E<lt> cdna_cds.fa E<gt> protein.fa
15 The script will translate one fasta file (on stdin) to protein on stdout
21 User feedback is an integral part of the evolution of this and other
22 Bioperl modules. Send your comments and suggestions preferably to
23 the Bioperl mailing list. Your participation is much appreciated.
25 bioperl-l@bioperl.org - General discussion
26 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
30 Report bugs to the Bioperl bug tracking system to help us keep track
31 of the bugs and their resolution. Bug reports can be submitted via
34 https://github.com/bioperl/bioperl-live/issues
38 Ewan Birney E<lt>birney@ebi.ac.ukE<gt>
45 my ($format,$outfile) = 'fasta';
48 'f|format:s' => \
$format,
49 'o|out|outfile:s' => \
$outfile,
52 my $oformat = 'fasta';
54 # this implicity uses the <> file stream
55 my $seqin = Bio
::SeqIO
->new( -format
=> $format, -fh
=> \
*ARGV
);
58 $seqout = Bio
::SeqIO
->new( -format
=> $oformat, -file
=> ">$outfile" );
60 # defaults to writing to STDOUT
61 $seqout = Bio
::SeqIO
->new( -format
=> $oformat );
63 while( (my $seq = $seqin->next_seq()) ) {
64 my $pseq = $seq->translate();
65 $seqout->write_seq($pseq);