I would think you could use some sort of grep. Here's kindof what I was thinking
my @set = qw (AAAAAT ATCGAT TTTTTG GCCCCC GTGGGG); my $lim = 0.75; my @newset = grep { my $a = $_ =~ tr/A//; my $t = $_ =~ tr/T//; my $c = $_ =~ tr/C//; my $g = $_ =~ tr/G//; $a / $len < $lim and $c / $len < $lim and $g / $len < $lim and $t / $len < $lim; } @set;
Update:
Wow... I just got beat to the punch big time! Three people posted while I was writing my response!
-Bryan
In reply to Re: Removing Poly-ATCG from and Array of Strings
by mrborisguy
in thread Removing Poly-ATCG from and Array of Strings
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |