[Bioperl-l] Translate to 6 ORF's

Wiepert, Mathieu Wiepert.Mathieu@mayo.edu
Tue, 23 Oct 2001 10:33:16 -0500


I want to translate a large fasta file with many sequences to proteins in
all 6 ORF's.  The code is simple, copied from the docs somewhere.  Do I have
to reverse the sequence and then translate to get the three reverse ORF's?  

use Bio::SeqIO;

$in  = Bio::SeqIO->new(-file => "file1.fa" , '-format' => 'Fasta');
$out = Bio::SeqIO->new(-file => ">file1_t1.fa" , '-format' => 'Fasta');

    while ( my $seq = $in->next_seq() ) {
        $translation = $seq->translate(undef,undef,0);
        $out->write_seq($translation);
    }