in reply to Regexps for microsatellites
my $thresh = 3; # as per Ikegami's note, pattern must repeat MORE THAN + this many times while (<DATA>) { while (/((.{1,6})\2{$thresh,})/g) { printf "$2 (length=%d) repeats in $1\n", length $2; printf "Found at $-[0] to %d in $_", pos()-1; } } __DATA__ GATTATTATTATTATTATTGCATATATATAGCAAAAAATTTTTTGC ATATTATATTATATTATATTGC ATAGACATAGACATAGAC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexps for microsatellites
by ikegami (Patriarch) on Nov 08, 2004 at 16:18 UTC |