in reply to extracting open reading frame (ORF) from a FASTA file
local $_ = $your_input_string; while ( /ATG/g ) { my $start = pos() - 3; if ( /T(?:AA|AG|GA)/g ) { my $stop = pos; print $start, " ", $stop, " ", $stop - $start, " ", substr ($_, $start, $stop - $start), $/; } }
Boris
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: extracting open reading frame (ORF) from a FASTA file
by Nadiah (Novice) on Jul 12, 2005 at 07:28 UTC | |
by borisz (Canon) on Jul 12, 2005 at 07:42 UTC | |
Re^2: extracting open reading frame (ORF) from a FASTA file
by Nadiah (Novice) on Jul 12, 2005 at 08:01 UTC |
In Section
Seekers of Perl Wisdom