<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Raku script to find microsatellites in DNA fragments !]]></title>
	<link>https://bioinformaticsonline.com/snippets/view/44454/raku-script-to-find-microsatellites-in-dna-fragments?</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/view/44454/raku-script-to-find-microsatellites-in-dna-fragments?" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/44454/raku-script-to-find-microsatellites-in-dna-fragments</guid>
	<pubDate>Thu, 01 Feb 2024 02:00:27 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/44454/raku-script-to-find-microsatellites-in-dna-fragments</link>
	<title><![CDATA[Raku script to find microsatellites in DNA fragments !]]></title>
	<description><![CDATA[<code>sub find-microsatellites($sequence, $min-repeat-length = 2, $max-repeat-length = 6, $min-repeat-count = 3) {
    my @microsatellites;

    for my $repeat-length ($min-repeat-length..$max-repeat-length) {
        for ^($sequence.chars - $repeat-length * $min-repeat-count + 1) -&gt; $i {
            my $substring = $sequence.substr($i, $repeat-length);

            if $sequence.contains($substring x $min-repeat-count) {
                @microsatellites.push($substring);
            }
        }
    }

    return @microsatellites.unique;
}

# Example usage
my $genome-sequence = &quot;ATCGATCGATCGATCGATCG&quot;;
my @result = find-microsatellites($genome-sequence);

say &quot;Microsatellites found: &quot;, @result;</code>]]></description>
	<dc:creator>LEGE</dc:creator>
</item>

</channel>
</rss>