SNP / Indel Analysis

Align multiple sequences Β· detect SNPs, insertions and deletions Β· build consensus

πŸ“˜ New to variant analysis? Read the tutorial to learn how alignment, SNP calling and IUPAC consensus work.

1 Sequences FASTA or one per line Β· max 100,000 bp each

Provide at least two sequences. Headers (>) are optional β€” without them each non-empty line is one sequence. Both DNA (ACGT) and RNA (ACGU) are accepted; IUPAC ambiguity codes (R, Y, S, W, K, M, B, D, H, V, N) are supported.
Analysis options
All other sequences are aligned to this one.
Larger = more specific, may fail on divergent sequences.
Hide variants present in fewer than this % of samples.
Full per-position tables can be very large.

i How the analysis works

  • Alignment β€” a seed-and-extend strategy: unique k-mers (default 15 bp) act as anchors; gaps between anchors are filled with Needleman–Wunsch.
  • SNP β€” single-base substitution where reference and query are not IUPAC-compatible.
  • Insertion β€” bases present in the query but absent from the reference.
  • Deletion β€” bases present in the reference but absent from the query.
  • Consensus β€” for each variant site the union of observed bases is collapsed to the appropriate IUPAC symbol.
  • Filtering β€” the minimum allele frequency hides variants below the chosen fraction of samples.
  • Limits β€” maximum 100,000 bp per sequence.

πŸ“˜ Tutorial & Result Interpretation

🧬 1. What this tool does

This tool aligns two or more DNA sequences against a reference, then reports every position at which the samples differ from the reference β€” and from each other. It is designed for Sanger amplicon analysis: a typical use case is resequencing a target gene in several individuals and asking which positions vary.

  • SNP β€” Single Nucleotide Polymorphism: one base differs.
  • Insertion (INS) β€” extra bases in a sample that are absent from the reference.
  • Deletion (DEL) β€” bases in the reference that a sample lacks.
  • Consensus β€” one IUPAC-encoded sequence that collapses all samples into a single string.
Key idea: the tool does not decide what is "real". It reports what it sees. Interpretation β€” whether a variation is a true biological variant or a sequencing artefact β€” is your job.

πŸ”€ 2. IUPAC ambiguity codes

When different samples carry different bases at the same position, the consensus cannot be a single letter. IUPAC ambiguity codes let you express "any of several bases" in one character.

A A Β· Adenine
C C Β· Cytosine
G G Β· Guanine
T T Β· Thymine
R R Β· A or G (purine)
Y Y Β· C or T (pyrimidine)
S S Β· G or C (strong)
W W Β· A or T (weak)
K K Β· G or T (keto)
M M Β· A or C (amino)
B B Β· C, G or T (not A)
D D Β· A, G or T (not C)
H H Β· A, C or T (not G)
V V Β· A, C or G (not T)
N N Β· any base
You seeIt meansTypical cause
A, C, G, TAll samples agree on this base.Invariant position.
RA and G both observed.Transition A↔G SNP.
YC and T both observed.Transition C↔T SNP.
SG and C both observed.Transversion G↔C SNP.
WA and T both observed.Transversion A↔T SNP.
KG and T both observed.Transversion G↔T SNP.
MA and C both observed.Transversion A↔C SNP.
NAny base β€” cannot decide.Poor quality, or β‰₯ 3 alleles.
In diploid organisms, an R at a position often means the individual is heterozygous for an A/G SNP.

πŸ“ 3. How the alignment works

Alignment is the process of inserting gaps into sequences so that homologous positions line up. This tool uses two strategies:

Identical length β€” position-by-position

If a query is the same length as the reference, it is compared base by base. Fast and exact.

Different length β€” anchor & fill

  1. Unique k-mers (default 15 bp) are indexed in the reference.
  2. The same k-mers are searched in the query β€” those matches are anchors.
  3. Anchors are chained left-to-right to form a skeleton.
  4. The gaps between anchors are filled by Needleman–Wunsch pairwise alignment.

This is much faster than full NW for large inputs and produces the same result when sequences are highly similar (> 90 % identity), which is the normal case for Sanger amplicons.

k-mer size matters. Smaller k = more anchors but more false matches; larger k = fewer anchors, may fail on divergent sequences. Default 15 is good for sequences β‰₯ 95 % identical. If alignment fails, try k = 12.

πŸ“₯ 4. Preparing your input

FASTA format (recommended)

Standard FASTA β€” one header line per sequence, then the sequence on as many lines as needed:

>sample1_forward
ATGCGTACGTAGCTAGCTAGCTAGCTAGCATCGATCGTAGCTAGCTAGCTAG
CATCGATCGATCGATCGATCGATCG

>sample2_forward
ATGCGTACGTAGCTAGCTAGCTAGCTAGCATCGATCGTAGCTAGCTAGCTAG
CATCGATCGATCGATCGATCGATCG

Plain one-per-line format

Each non-empty line is treated as one sequence, named Seq1, Seq2…

What this tool accepts

  • DNA β€” ACGT.
  • RNA β€” ACGU; U is converted to T.
  • IUPAC ambiguity codes β€” R, Y, S, W, K, M, B, D, H, V, N.
  • Anything else is stripped. Whitespace, digits, and punctuation are ignored.
Forward + reverse reads? Reverse-complement them yourself before pasting, so all sequences are on the same strand. The tool does not auto-orient.

πŸ“Š 5. Reading the variant table

ColumnMeaning
Position1-based coordinate in the reference.
TypeSNP / Insertion / Deletion; sub-label shows the length in bp.
ReferenceThe base(s) present in the reference at this position.
Allele(s) observedEvery alternative allele seen across the samples, with a count chip for each.
ConsensusIUPAC code representing all observed alleles at this position.
Samples affectedNumber of samples (and their names) that carry any non-reference allele here.

How to decide whether a variant is "real"

  • Present in multiple samples? A variant that appears in β‰₯ 2 independent samples is more convincing than a singlet.
  • In the same position as a known variant? Cross-reference with dbSNP if you are working with a well-characterised organism.
  • Supported by both strands? A heterozygous C/T SNP is visible on both forward and reverse reads. An artefact is often only on one strand.
  • Present at the very start or end of the read? Poor quality; usually discarded.
Mono-allelic indel artefact. A single deletion in one sample at a homopolymer run is almost always a sequencing artefact. Raise the minimum allele frequency filter to remove singletons.

🧾 6. The IUPAC consensus

The consensus is a single sequence that represents all samples. At invariant positions it matches the reference; at variant positions it uses an IUPAC ambiguity code combining all observed bases.

Example

Reference:  ATGCTAGCTAGC
Sample 1:   ATGCTAGCTGGC
Sample 2:   ATGTTAGCTAGC
            ────────────
Consensus:  ATGYTAGCTRGC
  • Position 4 β€” C in ref, C in S1, T in S2 β†’ Y (C or T).
  • Position 10 β€” A in ref, G in S1, A in S2 β†’ R (A or G).

When to use it

  • Primer design in a variable region β€” pick a conserved region, but keep track of ambiguity.
  • Submitting to GenBank β€” for population samples the IUPAC string is a compact representation.
  • Reference for the next round of analysis β€” paste it back as the reference in a follow-up run.
Never submit an IUPAC consensus as if it were a single sample's sequence. It is a representation, not an observation.

πŸ“‹ 7. Pairwise difference matrix

The matrix shows, for every pair of samples, the percentage of variant positions at which they differ (relative to the reference length).

ValueInterpretation
< 1 %Nearly identical β€” same haplotype or very closely related.
1–5 %Moderately different β€” different haplotypes, or different species of the same genus.
> 5 %Substantially different β€” different species, or a misalignment.
Quick sanity check: the diagonal must always be 0. If two samples are identical, their off-diagonal cell should be 0 too β€” if it isn't, the alignment may have artefacts.

πŸ” 8. Alignment viewer

The viewer shows the pairwise alignment of one sample against the reference, one block per variant site. Varying positions are boxed and coloured by type.

  • Reference row β€” the reference sequence. Β· means the reference has a gap here.
  • Sample row β€” the aligned query. Β· means the sample has a gap here.
  • Match row β€” | for a match, β€’ for a mismatch.
  • Colours β€” red = SNP, green = insertion, amber = deletion.
Zoom in by reducing the window size to 10–15 bp to see the exact local sequence around each variant.

πŸš€ 9. Recommended workflow (Sanger amplicon)

  1. Sequence your PCR products on both strands.
  2. Trim low-quality ends with a base-caller or a tool like SeqTrace.
  3. Reverse-complement reverse reads so all sequences are on the same strand.
  4. Paste all samples (FASTA format) into the input box.
  5. Set the reference β€” usually the wild-type or the annotated reference sequence.
  6. Run. Inspect the variant table; note the positions and the sample names.
  7. Filter: if the sample set is small, raise the minimum allele frequency to remove singletons that are likely sequencing errors.
  8. Download the consensus if you need a single representative sequence.
  9. Cross-check β€” look at the chromatograms for every reported variant.
  10. Confirm by an orthogonal method: RFLP, SNaPshot, HRM, or NGS.

⚠️ 10. Common pitfalls

Reverse read not complemented. The most common mistake. Forward and reverse reads must be on the same strand. If you paste the reverse read as-is, every position looks like a variant.
Chromatogram artefacts at the ends. The first 20–30 bp and last 20–30 bp of a Sanger read are unreliable. Trim them before analysis.
Heterozygous indels. A single-base deletion in a homopolymer run is one of the hardest features to call from Sanger data. Expect an IUPAC consensus with ambiguous calls nearby.
Low coverage positions. If a variant appears only once across many samples, verify the chromatogram β€” it may be a chemistry artefact.
Recombination of paralogues. If two amplicons are actually products of two related genes, alignment will show scattered variation across the whole length. Re-check primer specificity.
Best practice: sequence both strands, trim ends, complement reverse reads, and treat any singlet variant with scepticism until the chromatogram is inspected.

QC checklist

  • βœ” All sequences on the same strand (reverse reads complemented)
  • βœ” Low-quality ends trimmed
  • βœ” β‰₯ 2 independent samples per reported variant (or chromatogram verified)
  • βœ” Reference sequence is correct and annotated
  • βœ” Matrix diagonal = 0 (sanity)
  • βœ” Consensus exported with a clear name β€” e.g. genename_population_consensus.fa
  • βœ” Variants confirmed by an orthogonal method before publication