Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Raku script to find repeats in sequences !

  • Public
By LEGE 329 days ago
sub find-repeats($sequence, $min-repeat-length = 3) { my @repeats; for ^($sequence.chars - $min-repeat-length + 1) -> $i { my $substring = $sequence.substr($i, $min-repeat-length); if $sequence.contains($substring) > 1 && $substring !~~ any(@repeats) { @repeats.push($substring); } } return @repeats; } # Example usage my $genome-sequence = "ATCGATCGATCGATCG"; my @result = find-repeats($genome-sequence); say "Repeats found: ", @result;