DNA compare
Lists every position where two DNA sequences differ, with or without aligning them first.
Lists every position where two DNA sequences differ, with or without aligning them first.
It answers one question: where do these two DNA sequences differ, and how? The result is a list of differences, each with its position in sequence 1, the base in each sequence and a short name for the change. Sequence 1 is treated as the reference, so a deletion means a base that sequence 1 has and sequence 2 does not.
For the summary side of the same comparison, percent identity and similarity across a whole alignment and over every pair in a multiple alignment, use theidentity and similarity calculator. This page lists the positions; that one counts the columns.
The alignment uses match +1, mismatch −1, gap open 5 and gap extend 1, the defaults of theNeedleman–Wunsch tool, where the scores can be changed and the matrix inspected.
The denominator is every column of the comparison, gap columns included, which is the BLAST convention and the one used across this site. A three-base deletion therefore costs three columns of identity. The number of identical, mismatched and gap columns is given so you can recompute under another convention.
| Name | Meaning |
|---|---|
| 28G>A | Position 28 is G in sequence 1 and A in sequence 2 |
| 58_60del | Positions 58 to 60 are missing from sequence 2 |
| 44delT | The single base T at position 44 is missing |
| 42_43insTT | Sequence 2 has TT between positions 42 and 43 |
These follow the style of HGVS variant names but carry no reference sequence identifier, so they describe the pasted pair only. For a report, name the reference yourself.
The example loads a 66 base reference and a 63 base clone. On the "Align first" tab the alignment is 66 columns long and holds 3 differences: 12T>C,28G>A and 58_60del, a three-base deletion. That leaves 61 identical columns, 2 mismatches and 3 gap columns, so identity is 61 ÷ 66 × 100 = 92.4 %. Switch to "No alignment" and the same pair gives dozens of apparent mismatches after position 57, because the deletion shifts the rest of the clone out of register.
Input is read as IUPAC nucleotide codes, uppercased, with whitespace and position numbers ignored, so text pasted from GenBank works. U is read as T, so an RNA sequence can be compared with its DNA. Ambiguity codes are compared as literal characters: R against A is a difference, not a partial match, because a comparison should report what the two files actually say. To expand ambiguity codes first, use the IUPAC expander.
Paste one sequence in each box. On the "Align first" tab the two are aligned end to end, so insertions and deletions are found as well as substitutions; on the "No alignment" tab they are compared position by position, which is what you want for two sequences that are already the same length or already aligned. Every difference is listed with its position in sequence 1.
They follow the style of HGVS variant names, counted on sequence 1. 28G>A means position 28 holds G in sequence 1 and A in sequence 2. 58_60del means positions 58 to 60 of sequence 1 are missing from sequence 2. 42_43insTT means TT sits between positions 42 and 43 of sequence 1. The names have no reference transcript in front of them, so they describe the pair you pasted and nothing else.
Positions in sequence 1, counted from 1 and ignoring any gaps. Sequence 1 is the reference: differences are described as changes from sequence 1 to sequence 2. Swap the two boxes to reverse the direction, which turns every deletion into an insertion.
A position by position comparison has no way to slide one sequence along the other. A single missing base shifts everything after it, so a comparison without alignment reports a wall of mismatches from that point on instead of one deletion. The "Align first" tab runs a global Needleman–Wunsch alignment before comparing, which places the gap and leaves the rest matching.
Aligning needs memory proportional to the product of the two lengths, so a pair of a few thousand bases each is comfortable and much more than that gets slow. The "No alignment" tab is linear and handles very long sequences. Nothing is uploaded either way.