Documentation Index

Fetch the complete documentation index at: https://docs.discngine.com/llms.txt

Use this file to discover all available pages before exploring further.

Understanding Peptide Alignment

Prev Next

Ideation computes a peptide alignment for you — once for every dataset at import, and again on demand whenever you ask. This page explains the method behind it: how the reference is picked, how monomer substitutions are scored, and how gap costs are decided. Both paths use exactly the same method.

You don't need any of this to use an alignment. Read it when you want to know why a computed frame looks the way it does — why it has the number of columns it has, why a particular residue lines up where it does, or why two peptides you expected to match don't.

For the step-by-step instructions, see How to Align Peptides.

Why alignment is a choice, not a calculation

Peptides in a series differ in length and composition, so comparing them position-by-position means deciding which monomers "belong" in the same column. There is no single correct answer: pushing two residues into one column asserts they are equivalent, and inserting a gap asserts one peptide is missing something the other has. Every alignment method is a set of trade-offs about which of those assertions to prefer.

The trade-off that matters most in practice is columns versus honesty. A narrow frame is easy to read but forces unrelated residues to share positions; a scrupulous frame keeps residues honest but spreads the series across a wide, mostly-empty grid. The choices below are all aimed at that balance.

The center-star approach

Rather than aligning every peptide against every other one at once, Ideation aligns each peptide against a single shared reference — the "centre" of the star — and then stacks those pairwise results into one rectangular frame.

This is deliberately a modest method. The more elaborate alternatives — progressive or iterative alignment, which repeatedly merge groups of sequences together — generally produce a tighter frame, at a runtime a dataset of a thousand peptides cannot absorb during an import. The centre-star compromise gets most of the quality for a fraction of the work.

It also makes the result easier to reason about. Each peptide is placed by one comparison against the centre, so there is no sequence of merges whose order could change the outcome: add a peptide to the dataset and the existing peptides keep the placements they had, as long as the centre and the gap policy stay the same.

Choosing the centre

The centre is the dataset's longest backbone — deliberately not the reference peptide you picked for the SAR analysis.

Those two answer different questions. The SAR reference is your baseline for comparison, chosen because it is chemically interesting. The centre only has to be a good scaffold to hang everything else off, and what makes a good scaffold is length: every residue a peptide holds beyond the centre has to become an extra column for everyone, so a short centre widens the frame for the whole dataset and fills it with gaps.

Scoring a substitution

When the aligner compares two monomers, it scores them by how conservative the swap is, rather than as a plain same/different test:

Comparison Treated as
The same monomer Best possible match
Two monomers sharing the same natural analog Close match
Two monomers in the same physicochemical family (polar, hydrophobic, acidic, basic, sulfur) Neutral
Anything else Mismatch

Graded scoring is what lets non-natural monomers align sensibly. A modified residue inherits the natural analog and family of the amino acid it is based on, so aMeLys lines up with K instead of counting as unrelated to everything — which is the behaviour you want in a series built by decorating a natural sequence.

A monomer whose natural analog cannot be determined falls back to matching its own symbol exactly. It still aligns, just only with itself.

Gap handling

Pairs of sequences are aligned with the classic Needleman–Wunsch algorithm using affine gap costs: opening a gap costs more than extending one, so a single long insertion is preferred over several scattered ones. That matches how peptide series are usually built — a run of residues added or removed together, rather than sporadic single-residue holes.

The gap price itself is derived from your dataset rather than fixed, because the right value genuinely differs by series:

  • Across peptides that are all the same length, any gap is an artefact, and it has to be charged heavily or the aligner will invent gaps that mean nothing.
  • Across a series carrying genuine insertions and deletions, that same heavy charge would refuse to open the gaps the chemistry actually calls for, and force non-homologous residues to share columns instead.

Ideation measures the spread of backbone lengths in the dataset and interpolates between a strict and a permissive charge accordingly — uniform-length series get the strict end, heterogeneous ones the permissive end.

One rule holds either way: opening a gap always costs more than the worst possible substitution. Given the choice, the aligner would rather pair two unrelated residues than insert a gap. That keeps computed frames as narrow as the data allows.

Backbone first, then branches

The backbone chains get one global alignment pass. Each branch's attachment point is then translated into the aligned backbone column it hangs off, and branches attached at the same column are aligned together in their own small center-star.

Branches at different columns are never mixed — a branch hanging off position 5 is never compared with one hanging off position 12, because they are not the same feature of the molecule. This is what the x/y branches-aligned count on an alignment row refers to.

Gap costs are derived from backbone lengths only. The backbone frame is the one that has to be right, and branches are short enough that their own length spread is noise by comparison; reusing the backbone's policy also means one dataset yields one consistent set of rules.

What to keep in mind when reading a computed alignment

  • Because it is a star rather than a progressive alignment, insertions contributed by two different peptides at the same point are stacked into a shared block but are not aligned against each other. If two analogs each add a residue after position 10, they will occupy that block but not necessarily the same column within it.
  • Peptides with unresolved monomers are still aligned. A monomer's symbol is known even when its structure is not, and the symbol is all the aligner needs.
  • A computed alignment is a starting point, not a verdict. If it groups something wrongly for your purposes, open it in the alignment editor and adjust it, or import a curated alignment instead.

When it doesn't run

Automatic alignment is best-effort. If it cannot run, the import still succeeds and the dataset simply arrives without a default alignment. That happens when:

  • the dataset holds more than 5,000 peptides — the method's cost grows with both the number of peptides and their length, and past that point it would hold up the import;
  • no peptide carries a HELM sequence, so there are no monomer sequences to align.

In both cases you provide an alignment yourself by importing a file.

Where to go next