in reply to Re: Print A Sequence with Start codon and different Stop Codon
in thread Print A Sequence with Start codon and different Stop Codon

Yes, but it was so much fun :)

#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1146191 use strict; use warnings; my $sequence = 'AATGGTTTCTCCCATCTCTCCATCGGCATAAAAATACAGAATGATCTAACGAA' +; while( $sequence =~ /ATG/g ) { my $rest = $'; print 'ATG' . $` . $1 while $rest =~ /(TAG|TAA|TGA)/g; }

Replies are listed 'Best First'.
Re^3: Print A Sequence with Start codon and different Stop Codon
by PerlKc (Novice) on Oct 28, 2015 at 01:42 UTC

    I tried that, but my output should be set of sequences with start codon ATG and end codon TAG,TAA,TGA. For example ATG...............TAA ATG...........TAG ATG.........................TGA ATG.................................TAA .......represents sequence in middle of start and stop codon