I wish that it could find any of motifs for each gene
So it seems you want to test all motifs against every gene. In case the list of all motifs fits into working memory, you could read them into an array (once, at the beginning), and then iterate over it for every gene. Roughly sketched:
my @motifs; while (my $motif = <MOTIF>) { ... push @motifs, $motif; } while (my $seq = <FILE>) { ... for my $motif (@motifs) { if ( $seq =~ /$motif/ ) { ... } ... } }
In reply to Re^4: How to find any of many motifs?
by almut
in thread How to find any of many motifs?
by Nikulina
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |