Tandem repeat finder

Finds perfect tandem repeats and microsatellites, from homopolymer runs to 10 nt units.

Tandem repeats

What is a tandem repeat?

A tandem repeat is a short unit of DNA written several times in a row, with no other sequence in between: (CA)10, (CAG)9, (GATA)6. Short units of about 1 to 6 nt are called microsatellites, simple sequence repeats or short tandem repeats (STRs). They slip during replication, so their copy number changes quickly, which makes them the markers used in forensic profiling, linkage mapping, parentage testing and population genetics, and the cause of the triplet expansion diseases such as Huntington disease and fragile X.

They also break other work. A microsatellite inflates a k-mer count, stalls an assembler, produces stutter bands in a PCR, and is the usual reason a primer has an unexpected second product, so it is worth knowing where they are before designing anything.

How the repeats are found

For each unit length p the sequence is scanned once for the maximal stretches in which every base equals the base p positions earlier. Such a stretch is a perfect tandem array of period p, and the unit is the first p bases of it.

A run of period p covers positions i where s[i] = s[i + p]
Copies = floor(run length / p)   Repeat length = copies × p

Two rules keep the list free of duplicates. A unit that is itself periodic is never used, so an AT array is reported as (AT)n and never as (ATAT)n/2. And each array is reported once, from its first base, so (CAG)9 does not also appear as an (AGC) repeat starting one base later. Only whole copies are counted; a trailing partial copy is left out of the copy number and the length.

Worked example

"Try an example" loads a 180 nt region with five arrays. With units of 1 to 6 nt, at least 3 copies and at least 10 nt, the tool reports 5 tandem repeats:

UnitCopiesStartEndLength
CA10113020
CAG9406627
GATA6739624
A1210211312
TAGC612514824

The longest is (CAG)9, 27 bp. Together the five cover 107 of the 180 bases. Set "Unit length" to "2 to 6 nt" and the A12 homopolymer drops out, leaving 4.

Which settings should I use?

UnitNameUsual threshold
1Homopolymer run10 or more copies
2Dinucleotide microsatellite6 or more copies
3Trinucleotide, triplet repeat5 or more copies
4Tetranucleotide STR, forensic markers4 or more copies
5 to 6Penta- and hexanucleotide STR3 or more copies

Thresholds vary between studies, which is why both the copy number and the total length can be set here. The defaults, 3 copies and 10 nt, are loose on purpose: they catch the short arrays that matter for primer design. For a repeat catalogue, raise both.

Reading the table

  • Unit is the repeated motif, written from the first base of the array.
  • Start and End are 1-based positions in the record, both included.
  • Copies counts whole copies only, and Length is copies × unit length.
  • Units containing N or another ambiguity code are skipped.
  • In a multi-record FASTA every record is scanned on its own and named in the table.

Next steps: fuzzy search finds the same unit where a copy is imperfect, k-mer counter shows how much of a composition bias a repeat explains, and GC and AT content reports the base composition around it.

Frequently asked questions

How do I find tandem repeats in a DNA sequence?

Paste the sequence or choose a FASTA file. Every perfect run of a repeated unit, of the unit length you choose between 1 and 10 nt, is reported with its unit, copy number, start, end and length. Raise "Minimum copies" or "Minimum repeat length" to keep only the long ones, and Copy or Download gives the table as tab-separated text.

What is the difference between a microsatellite, an STR and a VNTR?

They overlap. A microsatellite or short tandem repeat (STR) has a unit of about 1 to 6 nt, a minisatellite or VNTR has a unit of roughly 10 to 100 nt, and a satellite is longer still. Forensic profiling uses tetranucleotide STRs such as (GATA)n because they amplify cleanly and vary a lot between people.

Why is a repeat reported under one unit and not its rotation?

CAGCAGCAG can be described as (CAG)3, (AGC)3 shifted by one, or (GCA)3 shifted by two. They are the same locus, so it is reported once, using the unit that begins at the first base of the run. A unit that is itself repetitive, such as ATAT, is never reported: that locus is listed as (AT)n instead.

Does it find imperfect repeats?

No. Only perfect runs are reported, where every copy matches the unit exactly. One substitution inside a long array splits it into two shorter reported repeats. For degenerate or interrupted repeats use Tandem Repeats Finder (Benson) or MISA, or search the unit with the fuzzy search tool and allow mismatches.

How long a sequence can it handle?

Several megabases. The scan is linear in the sequence length for each unit length, so a bacterial genome with units of 1 to 6 nt takes well under a second and nothing is sent to a server. Whole eukaryotic genomes belong in a command-line tool.