>jane*

Analyze

Dot Plot

Put two sequences on two axes and see what they share. A dot plot is the fastest way to see structure that a single alignment score hides: a tandem repeat as a ladder of diagonals, an inverted repeat as a line on the anti-diagonal, a duplication as a parallel line, an indel as a break. Three engines are here because the field has three: exact k-mer words, a sliding identity window, and a window scored through a substitution matrix. A fourth mode compares a whole SET all against all, as an N×N grid. Pick either axis from the active sequence, from your selection on the map, or from the sequence itself; click any run in the plot and those bases are selected back on the map.

Three comparisons, three engines: 8 cricket COI genes as a grid, 19 divergent HIV-1 env genes for the same grid at scale, and three globins for the scored engine

01

What it does

  1. 01Three real algorithms, not one with a flag: exact k-mer words, a sliding identity window, and a substitution-matrix-scored window
  2. 02All-against-all over a whole set (EMBOSS polydot): every ordered pair as an N×N grid, each panel scaled to its own two sequences
  3. 03Clicking a run in a grid cell selects those bases on THAT sequence, focusing its tab first
  4. 04The per-sequence lines/residues tally EMBOSS prints beside its plot, counted over each sequence's whole column
  5. 05Pick each axis independently — the active sequence, the current selection on the map, or the sequence against itself
  6. 06Reverse-complement pass, so an inverted repeat shows up as an anti-diagonal instead of as nothing
  7. 07IUPAC ambiguity codes expanded rather than dropped, with a budget for how much of a word may be N (or X for protein)
  8. 08Best-path reduction (EMBOSS dotpath) to collapse the forward segments to a non-overlapping path
  9. 09Word size suggested from the two lengths — the smallest k keeping expected chance matches under one — and manual the moment you touch it
  10. 10Window engine knobs in full: window size, matches required, step, and a phase shift on the second sequence
  11. 11Matrix engine on EDNAFULL or BLOSUM62 with an adjustable score threshold, which is what diverged protein needs
  12. 12Your own substitution matrix, pasted in EMBOSS/NCBI format, overriding the built-in ones
  13. 13Readouts for the longest forward and reverse run, run counts per strand, and the fraction of each sequence covered — labelled as coverage, not as identity
  14. 14Clicking a run selects those bases on the sequence map; a pick outside the sequence says so instead of selecting the wrong bases
  15. 15Drawn on a canvas, so a 20 kb self-comparison with tens of thousands of segments still scrolls
  16. 16Export every match as TSV — for a set, keyed by both sequence names
02

What it runs on

Three engines plus the all-against-all composite in packages/ports/homology/dotplot, each a faithful port of a different upstream and each golden-validated against that upstream in its own language: the word engine from FlexiDot (Python), the identity-window engine from seqinr dotPlot (R), the matrix engine from EMBOSS 6.6.0 dotmatcher (C, compiled only to generate the vectors), and polydot against the real FlexiDot polydotplot. 232 tests. The panel runs on @ports/dotplot.

Everything runs client-side. Files are parsed in the browser and projects are saved on this machine, so an unpublished sequence is never uploaded.

03

Questions

Why three algorithms instead of one?
Because they answer different questions and none subsumes the others. The exact k-mer engine draws clean lines fast but is blind to a repeat carrying a substitution every few bases. The identity window sees that repeat, but every mismatch costs the same to it. Only the matrix engine knows that K→R is a conservative substitution and K→P is not, which is what a diverged protein comparison needs.
How do I read a dot plot?
An unbroken main diagonal means the two sequences are the same. A ladder of parallel diagonals is a tandem repeat, a line on the anti-diagonal is an inverted repeat, a parallel line off the diagonal is a duplication, a break in the diagonal is an insertion or deletion, and a shifted block is a translocation.
Can I compare a sequence with itself?
Yes — that is the repeat-finding case. Switch on "Compare with itself" and the reverse-complement pass, and inverted repeats appear as anti-diagonals off the main line.
What word size should I use?
The suggested one, until you have a reason. It is derived from the two sequence lengths as the smallest k that keeps the expected number of chance matches under one, so the plot shows structure rather than noise. Touching the field switches it to manual.
Does it handle protein?
Yes. Switch on Protein: the reverse-complement pass turns off (it is meaningless), X becomes the unknown residue, and the matrix engine scores on BLOSUM62. Residues the matrix does not declare are reported rather than silently scored as zero.
Can I compare more than two sequences?
Yes — switch to All against all. Every sequence in the set is compared with every other and the plots are laid out as a grid, the way EMBOSS polydot does it: each panel is as wide as its X sequence and as tall as its Y sequence, so the cells are comparable by eye. Clicking a run selects those bases on the sequence that cell names, not on whichever tab happens to be in front of you.
Is anything uploaded?
No. Both engines run in the browser on the sequences already in your project.

Also searched as

compare two DNA sequences visually · dot plot online · dottup and dotmatcher in the browser · find tandem repeats in a plasmid · find inverted repeats in a sequence · self comparison dot plot · sequence similarity plot · protein dot plot with BLOSUM62 · all against all dot plot · polydot alternative · compare many sequences at once · dottup alternative · dotmatcher alternative · FlexiDot alternative · Gepard alternative · repeat structure plot