Skip to content

Historically conserved sequences

Stretches of a viral proteome that stay invariant across years of evolution are candidate targets for vaccines and diagnostics (Khan et al. 2008; Rolland et al. 2007). DiMA reports them as historically conserved sequences (HCS): runs of positions whose most common k-mer is carried by (almost) every sequence (Tharanga et al. 2025; Hu et al. 2013; Abd Raman et al. 2020).

A position qualifies when its Index variant (see motifs) reaches the threshold incidence θ (--hcs-min-incidence, default 100%, the paper’s “completely conserved”):

(1) 100 ⋅ c Index   ≥   θ ⋅ N .

The comparison is exact: θ is read as a decimal (for example 95.5) and compared in integer arithmetic, so a position never misses the threshold through floating-point rounding.

θ must lie above 50% and at most 100%. Above 50% at most one variant can reach it, so every qualifying position has exactly one conserved k-mer and a region’s sequence is well defined. (DiMA v5.0.9 accepted any threshold and let tied Index variants of the same position compete.) Because an Index needs a count above 1, a qualifying position has a support of at least 2.

Qualifying positions are taken in order, and each one joins the current region when

  1. its k-mer overlaps or abuts the region: it starts no later than one column after the region’s last column, as in the conserved-sequence tables of Abd Raman et al. (Abd Raman et al. 2020); and
  2. it agrees with the region on every column they share.

Otherwise a new region starts; when the new k-mer overlapped the previous region but disagreed with it, the new region is marked split_from_previous. Consecutive overlapping 9-mers therefore build one region whose sequence is the union of their columns: positions 7–14 of the MERS-CoV spike protein form the 16-residue region LLMFLLTPTESYVDVG, columns 7–22.

Each region reports its columns (start_column, end_column, length), its sequence, its member positions with their k-mer, count, support and incidence, the lowest member incidence (min_incidence) and the lowest member support (min_support).

Flagging regions that rest on few sequences

Section titled “Flagging regions that rest on few sequences”

The paper, like DiMA v5.0.9, lets any position qualify, whatever its support. A k-mer carried by 2 of 2 sequences is “100% conserved”, but that says little. DiMA keeps every qualifying position and flags the regions that include positions with support at or below T , as the DiMA lineage did: Abd Raman et al. list such positions in their conserved-sequence tables, marked with an asterisk (“Positions with total number of sequences less than 100”) (Abd Raman et al. 2020), and Hu et al. show them “to maintain the protein sequence structure” (Hu et al. 2013). Each region lists low_support_positions — every position in its span with support ≤ T , member or not — and is flagged when the list is not empty. Flagged regions raise the hcs_low_support_regions warning.

To make “how conserved, on how much evidence” explicit, every member and every region carries the exact two-sided 95% Clopper–Pearson lower confidence bound of the Index proportion (Clopper & Pearson 1934): for x Index sequences out of N , the proportion p at which observing x or more has probability 2.5%,

(2) Pr [ X ≥ x ∣ X ∼ Binomial ( N , p ) ] = 0.025 , and p = 0.025 1 / N    when  x = N .

A region’s conservation_lower_bound_95 is the lowest bound among its members. The interval is conservative — its coverage is at least the nominal 95% (Brown et al. 2001) — so a high bound is strong evidence. For a k-mer carried by every sequence:

Support N 231017100
Lower bound15.8%29.2%69.2%80.5%96.4%

A bound of at least 80% needs at least 17 sequences.

--hcs-eligible-only admits only positions with support above T , and lets a position with support ≤ T between two members end the region instead of being flagged. This is the analysis set of Hu et al. (Hu et al. 2013), and the behaviour of alignment-trimming tools that let gappy columns break conserved blocks (Castresana 2000). Use it when a conserved region must rest on well-supported positions only.

With the defaults ( T = 100 ; HIV-1 pol DNA at 70%):

DatasetThresholdRegionsFlaggedNotesWith --hcs-eligible-only
MERS-CoV spike protein100%440the first spans columns 7–2244
MERS-CoV spike gene100%101columns 3518–3572 (55 nt): min support 2, 29 low-support positions, bound 15.8%9
HIV-1 pol protein100%11columns 373–381: support 3, bound 29.2%0
HIV-1 pol DNA70%20columns 3046–3077 (32 nt, min incidence 80.1%, bound 78.5%) and 3156–3185 (30 nt, 71.5%, bound 69.8%)the same 2

The HIV-1 pol DNA regions are compared with the paper in Comparison with the paper.

Regions are computed from the results, so they can be recomputed at another threshold without reanalysing the alignment: dima hcs -i results.json --hcs-min-incidence 95. During an analysis, --hcs-output, --tsv-dir and --table hcs write them. See Find conserved sequences.

  • Abd Raman HS, Tan S, August JT, Khan AM. Dynamics of Influenza A (H5N1) virus protein sequence diversity. PeerJ. 2020;7:e7954. doi:10.7717/peerj.7954 ↩︎ 1 2 3
  • Brown LD, Cai TT, DasGupta A. Interval Estimation for a Binomial Proportion. Statistical Science. 2001;16(2):101-133. doi:10.1214/ss/1009213286 ↩︎
  • Castresana J. Selection of Conserved Blocks from Multiple Alignments for Their Use in Phylogenetic Analysis. Molecular Biology and Evolution. 2000;17(4):540-552. doi:10.1093/oxfordjournals.molbev.a026334 ↩︎
  • Clopper CJ, Pearson ES. The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika. 1934;26(4):404-413. doi:10.1093/biomet/26.4.404 ↩︎
  • Hu Y, Tan PT, Tan TW, August JT, Khan AM. Dissecting the Dynamics of HIV-1 Protein Sequence Diversity. PLoS ONE. 2013;8(4):e59994. doi:10.1371/journal.pone.0059994 ↩︎ 1 2 3
  • Khan AM, Miotto O, Nascimento EJM, Srinivasan KN, Heiny AT, Zhang GL, Marques ET, Tan TW, Brusic V, Salmon J, August JT. Conservation and Variability of Dengue Virus Proteins: Implications for Vaccine Design. PLoS Neglected Tropical Diseases. 2008;2(8):e272. doi:10.1371/journal.pntd.0000272 ↩︎
  • Rolland M, Nickle DC, Mullins JI. HIV-1 Group M Conserved Elements Vaccine. PLoS Pathogens. 2007;3(11):e157. doi:10.1371/journal.ppat.0030157 ↩︎
  • Tharanga S, Ünlü ES, Hu Y, Sjaugi MF, Çelik MA, Hekimoğlu H, Miotto O, Öncel MM, Khan AM. DiMA: sequence diversity dynamics analyser for viruses. Briefings in Bioinformatics. 2025;26(1):bbae607. doi:10.1093/bib/bbae607 ↩︎