Thanks in advance!#!/usr/bin/perl use strict; use warnings; my $inputseq = "AATGGTTTCTCCCATCTCTCCATCGGCATAAAAATACAGAATGATCTAA"; my $regex = '\w+(ATG\w*T(AG|AA|GA))\w+'; find_coding($inputseq); sub find_coding { my ( $seq ) = @_; while ( $seq =~ /($regex)/g ) { my $match = $1; my $sequence = find_coding($match); my $allmatch = find_coding($sequence); print "Coding region: $allmatch", "\n"; } }
In reply to Using Recursion to Find DNA Sequences by clueless_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |