Repository navigation
feat: detect putative recombinant regions 🧪 - #1774
Merged
Merged
Conversation
2 tasks done
This was referenced Nov 11, 2026
ivan-aksamentov
force-pushed
the
feat/recombination-detection
branch
from
November 11, 2026 14:50
af321ce to
2710353
Compare
This was referenced Nov 17, 2026
Two-state HMM (wildtype vs recombinant) decoded by Viterbi in log-space. Three-valued observations (Ref, Mut, Missing) where Missing emits with probability 1 in both states, contributing no evidence while allowing transitions across uncovered stretches. Adds pathogen.json config schema with gamma, muW, muR parameters.
- gamma = 1/L: one expected state switch per genome - muW = mean terminal branch length / L: typical divergence of a new sequence - muR = median pairwise inter-clade leaf distance / L: expected mutation density in a region from a different clade
Run detection per-sequence in the parallel phase after private mutation calling. Surface skip reasons through the warnings output when detection cannot run (no tree, too few clades, no branch mutations).
Purple markers on the sequence view with tooltip showing "Putative recombinant", nucleotide range, and length.
Enforce invariants on construction: parameters in (0,1), gamma < 0.5 (state switching rarer than staying), muR > muW (recombinant state carries elevated divergence). Trim leading/trailing Missing positions from decoded intervals so reported ranges start and end at covered positions.
Use pairwise leaf-to-leaf distances via MRCA path lengths instead of founder-to-founder distances. Founder distances underestimate inter-clade divergence when founder branches are short relative to the tips.
… as missing Exclude deletions from per-branch mutation counts: a deletion is a single event, not a run of per-site mutations. Treat placement-masked positions as Missing to prevent false recombinant calls at homoplasic sites.
Nested RecombinationRegion with range, length, and optional confidence. Dot-notation TSV columns in a dedicated Recombination output category. Rec. column in the results table with sortable total length and tooltip.
Forward-backward algorithm computes per-site posterior marginals in log-space. Each Viterbi-decoded interval receives a confidence score equal to the mean posterior marginal within it. Higher confidence produces more opaque markers in the viewer.
Show markers in absolute and all relative views. Add per-region confidence to the Rec. column tooltip. Cap the tooltip region list before building React elements.
Resolve each HMM parameter independently: explicit pathogen.json values bypass estimation for that parameter. Validate RecombinationHmmParams on deserialization via TryFrom. Parse branch mutation tokens structurally to classify deletions by gap base. Add minPrivateSubsToRun gate (default 1).
Introduce shared test macros (pretty_assert_ulps_eq!, pretty_assert_abs_diff_eq!, assert_error!). Derive PartialEq on result types and compare whole values.
Add algorithm page to user docs. Document pathogen.json recombination config, output columns, and parameter bounds. Fix broken pipe escaping in the QC-status TSV table.
Decision record covering model specification, parameter estimation, observation model, pipeline integration, configuration, output format, and viewer behavior. Includes follow-up proposals and minimizer scoring notes.
Point the gamma and muW references at the current `estimate_gamma` and `estimate_mu_w` functions in `recombination_estimate.rs`; the old line ranges had drifted onto unrelated code as helpers were added above them.
- Add a direct `compute_log_emission` test with hand-derived `ln` values, independent of the brute-force oracles (which reuse the same emission function) so a Ref/Mut or wildtype/recombinant column swap is caught. - Collapse per-element assertion loops: the brute-force marginal test compares each state column as a whole slice (`approx` implements `AbsDiffEq` for `[f64]`), and the qualitative-band and confidence loops become single min/max assertions that report the offending extreme. - Add boundary cases: zero reference length for `build_observations`, a per-field `muW` out-of-range override, and full `RecombinationConfig` camelCase serde round-trip. - Use `json_parse` for golden-master fixtures; drop assertions entailed by a preceding whole-value equality; pair range and confidence at the `from_ranges` call sites. The serde round-trip keeps a 2-ULP tolerance: serde_json's default float parser is best-effort, not bit-exact (its `float_roundtrip` feature would guarantee exactness), so a bit-exact assertion flakes by ~1 ULP. The genome-scale golden-master tolerance stays at 1e-7: the measured max marginal divergence from the prototype's `log(0)` smoothing is 3.19e-8, so 1e-8 does not pass.
Repoint KB issue and proposal links, and the golden-master capture-script header, to the split `recombination/*.rs` files: the monolithic `recombination.rs` and `recombination_estimate.rs` no longer exist. Stale line anchors are dropped, since the split changed line numbers; the links now target the correct concern file. Also convert the algorithm page's definition lists from `term -- description` to `term: description`.
`ColumnRecombination` and `SequenceMarkerRecombination` each reimplemented percentage rendering. Extract `formatPercentage` and `formatPercentageOfTotal` so the precision and the zero-denominator policy live in one place.
- `ln(0.1)` in the emission test equals `-LN_10`; the hand-derived `ln` expected values are a deliberate oracle, not an approximation of a named constant.
The muW/muR tree-based estimates counted insertion tokens (gap reference, e.g. "-10A") as branch substitutions, but the decoder never observes insertions: its `Mut` emissions come from `private_substitutions` only and `build_observations` has no insertion channel. Counting them calibrated the emission rates against events the model cannot score, inflating both rates on externally produced trees (augur/TreeTime) that carry insertion tokens. Count a branch mutation only when both reference and query bases are present (non-gap), so calibration matches the substitution-only event set the decoder sees. Nextclade-built trees carry substitutions only and are unaffected.
Reconcile the decision record with the substitution-only calibration: both muW and muR count a branch mutation only when reference and query bases are present, so neither insertions nor deletions contribute. Update the nextclade_data mirror description accordingly and remove the now-resolved known issue.
- Function-level `#[allow]` does not suppress warnings from `#[case]` attribute arguments; module-level does
- The recombination columns form a static category, so a separate include flag duplicated the category selection and was never read
- Viterbi decoding alone decides the calls; the region and sequence checks replace the confidence score as the evidence filter
- `recombination.enabled` in pathogen.json switches detection on; `--with-recombination` and `--without-recombination` override it in both directions - When detection is on, every reason that blocks it fails the dataset load with an error that names the cause, instead of a silent skip
- Only a sequence without private substitutions cannot produce a call, so the skip stays internal and exact
- Recombinants are rare in many viral species, so the expected switch rate is far below one per genome; the higher switch cost also needs more mutations for a call and removes very short calls
- A region whose span is mostly missing data, or that is shorter than a minimal length, rests on too little evidence for a call - `recombination.maxRegionMissingFraction` (default 0.5) and `recombination.minRegionLength` (default 50) set the thresholds
- The weighted total of the private mutations rule becomes reusable on a subset of positions, so the recombination checks can apply it to the part of a sequence outside the recombinant regions
…e rest does not fit the tree - A sequence whose regions span more than `recombination.maxRecombinantFraction` (default 2/3) of its alignment carries no localized signal - The private mutations outside the regions must still pass the private mutations QC rule, with `typical` and `cutoff` scaled by the covered fraction of the genome outside the regions; detection therefore requires `qc.privateMutations`
- The output tables have no recombination columns and the results table has no Rec. column for a dataset that does not run detection
ivan-aksamentov
force-pushed
the
feat/recombination-detection
branch
from
November 17, 2026 15:19
eb4445b to
3ffc42c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous description (replaced 2026-11-11)
nextclade_data: #464🧪 Try it
Provenance
Design and function contract specified in the Nextclade multi-reference meeting (2026-06-26). Implementation follows a Python prototype and its algorithm notes.
Motivation
A recombinant sequence -- one whose genome is a mosaic of segments from different lineages -- produces a localized cluster of private mutations when placed on the reference tree. Nextclade currently has no way to distinguish this pattern from a poorly sequenced region, a novel variant, or contamination. The private-mutation QC rule penalizes all three equally.
This PR adds a per-sequence detector that identifies where the breakpoints are, without naming the donor lineage. Downstream consumers can mask the flagged regions and re-place if needed.
Design
The full specification is in the decision record, which covers the model, estimation, pipeline integration, configuration, output, viewer, and deferred work. The summary below is for reviewers who want to evaluate the approach without reading the full document.
Model
A two-state Hidden Markov Model walks the alignment with states wildtype ($w$ ) and recombinant ($r$ ), decoded by Viterbi in log-space [src]. At each reference position the model sees one of three observations relative to the sequence's inferred parent:
RefMutMissingMissingpositions contribute no evidence but allow transitions to persist across uncovered stretches, so a recombinant region bridging an N run is not split. Deletions areMissingbecause a large deletion is one mutational event, not a cluster of per-site mutations that would inflate local density and trigger false calls. Placement-masked sites areMissingto prevent false calls at homoplasic positions.The joint likelihood for observation sequence$s$ given hidden states $h$ is:
where$s = (s_1, \ldots, s_L)$ is the observation sequence, $h = (h_1, \ldots, h_L)$ is the hidden state sequence with $h_l \in {w, r}$ , $P(s_l \mid h_l)$ is the emission probability, and $T$ is a symmetric transition matrix with off-diagonal $\gamma$ .
Parameters
Three parameters govern the model [src]:
Parameters are resolved once per dataset, not per sequence. Each parameter resolves independently: an explicit$\mu_r$ uses leaf-to-leaf MRCA path distances, not founder-to-founder distances, because short founder branches underestimate inter-clade divergence.
pathogen.jsonvalue bypasses estimation for that parameter. Estimation counts substitutions and insertions but excludes deletions (a deletion token is identified structurally by a gap query base, not by string suffix).Each state transition costs$c = \ln((1-\gamma)/\gamma)$ nats; the decoder switches only when accumulated emission evidence exceeds $c$ . For a 30 kb genome, $c \approx 10.3$ nats.
Three invariants are enforced on every construction and deserialization path: all parameters in$(0,1)$ ; $\gamma < 0.5$ ; $\mu_r > \mu_w$ .
Forward-backward confidence
After Viterbi identifies intervals, the forward-backward algorithm [src] computes per-site posterior marginals$P(h_l = r \mid s)$ in log-space. Each interval receives a confidence score equal to the mean posterior marginal within it -- a per-call reliability measure that Viterbi's single hard path cannot express. Values near 1 indicate high posterior certainty; values near 0.5 indicate ambiguous evidence.
Forward-backward runs only when Viterbi finds at least one interval, avoiding the$O(L)$ memory cost for the common case.
Pipeline integration
Detection runs per-sequence in the parallel phase, after private mutation calling [src]:
minPrivateSubsToRun(default 1) -- a sequence with no private substitutions has an all-Ref/Missingobservation vector, so the recombinant state can never outscore wildtypeReffor aligned positions,Mutfor private substitutions, then non-comparable ranges override toMissingMissingConfiguration
pathogen.jsonsnippet (all fields optional):{ "recombination": { "enabled": true, "minPrivateSubsToRun": 1, "gamma": 3.3e-5, "muW": 0.001, "muR": 0.01 } }enabled: absent = default-on,true= explicit opt-in,false= disabledminPrivateSubsToRun: skip sequences below this count (default 1)gamma,muW,muR: when set, bypass tree-based estimation for that parameter. Must satisfyThe companion
scripts/recombination_paramsinnextclade_datacomputes these values from a dataset's tree and reference, for freezing reviewed parameters intopathogen.json.When a dataset cannot support detection (no tree, fewer than two clades, no branch mutations):
enabledabsent): silently skippedenabled: true: dataset-level error naming the causeInvalid explicit parameters are always errors. The skip reasons are enumerated by
RecombinationSkipReason[src].Output
Recombination is an observation about sequence origin, not a quality metric, so results go into dedicated output columns rather than the QC system.
JSON:
recombinationfield on each sequence result, omitted when no intervals found:{ "regions": [{ "range": { "begin": 100, "end": 200 }, "length": 100, "confidence": 0.95 }], "totalRegions": 1, "totalLength": 100, "longestRegion": { "range": { "begin": 100, "end": 200 }, "length": 100, "confidence": 0.95 } }TSV: dot-notation columns in a dedicated
Recombinationcategory (recombination.regions,recombination.regionConfidences,recombination.totalRegions,recombination.totalLength,recombination.longestRegion.range,recombination.longestRegion.length).Viewer
#8f2fd4fill,#e0b3ffborder) in all nucleotide views (absolute and relative)Rec.column in the results table, sortable by total recombinant length, with a tooltip showing region count, total length, longest region, and per-region confidenceDifferences from the prototype
Missingwith emission probability 1 instead of binaryMissingto prevent false calls at homoplasic positionsMissingstripped so reported ranges start and end at covered positionsTryFromin addition to range checksWork items
RecombinationRegionwith dot-notation TSV columns andRec.table columnminPrivateSubsToRungate, deserialization validation, structural branch-mutation parsingpretty_assert_ulps_eq!,assert_error!) and whole-value comparisonKnown issues
Possible improvements
nextclade_data: #464 (not for merging)video-recombination-detection.mp4
🧪 Try it
Detection is on in the test datasets of #464. CLI binaries: GHA artifacts. In the web app, set "Genetic feature" to "Nucleotide sequence" to see the purple bands.
Selected datasets whose example sequences get recombination calls. Most example sequences have no call and show
--: sort by theRec.column to bring the calls to the top.🧪 All test datasets: web links and CLI flags
CLI:
nextclade run --server https://raw.githubusercontent.com/nextstrain/nextclade_data/refs/heads/feat/recombination-detection/data_outputwith the flags of the row.nextstrain/sars-cov-2/BA.2--dataset-name nextstrain/sars-cov-2/BA.2nextstrain/sars-cov-2/XBB--dataset-name nextstrain/sars-cov-2/XBBcommunity/neherlab/hiv-1/hxb2--dataset-name community/neherlab/hiv-1/hxb2enpen/enterovirus/cva16--dataset-name enpen/enterovirus/cva16nextstrain/hmpv/all-clades/NC_039199--dataset-name nextstrain/hmpv/all-clades/NC_039199nextstrain/sars-cov-2/BA.2.86--dataset-name nextstrain/sars-cov-2/BA.2.86community/v-gen-lab/dengue/denv1--dataset-name community/v-gen-lab/dengue/denv1enpen/enterovirus/ev-a71--dataset-name enpen/enterovirus/ev-a71enpen/enterovirus/ev-d68--dataset-name enpen/enterovirus/ev-d68community/v-gen-lab/dengue/denv4--dataset-name community/v-gen-lab/dengue/denv4nextstrain/orthoebolavirus/ebov--dataset-name nextstrain/orthoebolavirus/ebovnextstrain/rsv/a/EPI_ISL_412866--dataset-name nextstrain/rsv/a/EPI_ISL_412866nextstrain/rsv/b/EPI_ISL_1653999--dataset-name nextstrain/rsv/b/EPI_ISL_1653999community/isuvdl/mazeller/prrsv2/orf5/yimim2023--dataset-name community/isuvdl/mazeller/prrsv2/orf5/yimim2023community/v-gen-lab/dengue/denv2--dataset-name community/v-gen-lab/dengue/denv2enpen/enterovirus/cva10--dataset-name enpen/enterovirus/cva10nextstrain/measles/N450/WHO-2012--dataset-name nextstrain/measles/N450/WHO-2012nextstrain/ndv/class-2/NC_075404--dataset-name nextstrain/ndv/class-2/NC_075404nextstrain/rubella/E1--dataset-name nextstrain/rubella/E1nextstrain/sars-cov-2/wuhan-hu-1/orfs--dataset-name nextstrain/sars-cov-2/wuhan-hu-1/orfsnextstrain/sars-cov-2/wuhan-hu-1/proteins--dataset-name nextstrain/sars-cov-2/wuhan-hu-1/proteinscommunity/UdeM-LMIVV/BabyV/PRRSV2/nsp3-4-5/Baby2026--dataset-name community/UdeM-LMIVV/BabyV/PRRSV2/nsp3-4-5/Baby2026community/anses/swIAV/H1--dataset-name community/anses/swIAV/H1community/anses/swIAV/H3--dataset-name community/anses/swIAV/H3community/anses/swIAV/N1--dataset-name community/anses/swIAV/N1community/anses/swIAV/N2--dataset-name community/anses/swIAV/N2community/genspectrum/marburg/HK1980/all-lineages--dataset-name community/genspectrum/marburg/HK1980/all-lineagescommunity/itps/zikav--dataset-name community/itps/zikavcommunity/moncla-lab/iav-h5/ha/2.3.2.1--dataset-name community/moncla-lab/iav-h5/ha/2.3.2.1community/moncla-lab/iav-h5/ha/2.3.4.4--dataset-name community/moncla-lab/iav-h5/ha/2.3.4.4community/moncla-lab/iav-h5/ha/all-clades--dataset-name community/moncla-lab/iav-h5/ha/all-cladescommunity/pathoplexus/cchfv/S--dataset-name community/pathoplexus/cchfv/Scommunity/pathoplexus/yellow-fever-virus--dataset-name community/pathoplexus/yellow-fever-viruscommunity/v-gen-lab/chikV/genotypes--dataset-name community/v-gen-lab/chikV/genotypescommunity/v-gen-lab/dengue/denv3--dataset-name community/v-gen-lab/dengue/denv3nextstrain/flu/b/ha/KX058884--dataset-name nextstrain/flu/b/ha/KX058884nextstrain/flu/b/na/CY073894--dataset-name nextstrain/flu/b/na/CY073894nextstrain/flu/h1n1pdm/ha/CY121680--dataset-name nextstrain/flu/h1n1pdm/ha/CY121680nextstrain/flu/h1n1pdm/ha/MW626062--dataset-name nextstrain/flu/h1n1pdm/ha/MW626062nextstrain/flu/h1n1pdm/na/MW626056--dataset-name nextstrain/flu/h1n1pdm/na/MW626056nextstrain/flu/h3n2/ha/CY163680--dataset-name nextstrain/flu/h3n2/ha/CY163680nextstrain/flu/h3n2/ha/EPI1857216--dataset-name nextstrain/flu/h3n2/ha/EPI1857216nextstrain/flu/h3n2/na/EPI1857215--dataset-name nextstrain/flu/h3n2/na/EPI1857215nextstrain/flu/vic/ha/KX058884--dataset-name nextstrain/flu/vic/ha/KX058884nextstrain/flu/vic/na/CY073894--dataset-name nextstrain/flu/vic/na/CY073894nextstrain/flu/yam/ha/JN993010--dataset-name nextstrain/flu/yam/ha/JN993010nextstrain/mpox/all-clades--dataset-name nextstrain/mpox/all-cladesnextstrain/mpox/clade-i--dataset-name nextstrain/mpox/clade-inextstrain/mpox/clade-iib--dataset-name nextstrain/mpox/clade-iibnextstrain/mpox/lineage-b.1--dataset-name nextstrain/mpox/lineage-b.1nextstrain/ndv/class-1/AB524405--dataset-name nextstrain/ndv/class-1/AB524405nextstrain/wnv/all-lineages--dataset-name nextstrain/wnv/all-lineagesnextstrain/yellow-fever/prM-E--dataset-name nextstrain/yellow-fever/prM-E🧪 Smoke test: run every test dataset
Provenance
Design and function contract specified in the Nextclade multi-reference meeting (2026-06-26). Implementation follows a Python prototype and its algorithm notes. A scientific review of the first implementation (2026-11) set the opt-in, the default$\gamma$ , and the checks of the calls; the checks follow the reviewers' reimplementation of the call pipeline.
Motivation
A recombinant sequence -- one whose genome is a mosaic of segments from different lineages -- produces a localized cluster of private mutations when placed on the reference tree. Nextclade currently has no way to distinguish this pattern from a poorly sequenced region, a novel variant, or contamination. The private-mutation QC rule penalizes all three equally.
This PR adds a per-sequence detector that identifies where the breakpoints are, without naming the donor lineage. Downstream consumers can mask the flagged regions and re-place if needed.
Design
The full specification is in the decision record, which covers the model, estimation, the checks of the calls, opt-in, configuration, output, viewer, and deferred work. The summary below is for reviewers who want to evaluate the approach without reading the full document.
Model
A two-state Hidden Markov Model walks the alignment with states wildtype ($w$ ) and recombinant ($r$ ), decoded by Viterbi in log-space [src]. At each reference position the model sees one of three observations relative to the sequence's inferred parent [src]:
RefMutMissingMissingpositions contribute no evidence but allow transitions to persist across uncovered stretches, so a recombinant region bridging an N run is not split. Deletions areMissingbecause a large deletion is one mutational event, not a cluster of per-site mutations that would inflate local density and trigger false calls. Placement-masked sites areMissingto prevent false calls at homoplasic positions. Each maximal run of the recombinant state, trimmed to covered ends [src], is a candidate region.Parameters
Three parameters govern the model [src]:
Parameters are resolved once per dataset, not per sequence. Each parameter resolves independently: an explicit$c = \ln((1-\gamma)/\gamma) \approx 14.9$ nats for a 30 kb genome, and the low rate removes very short calls. Three invariants are enforced on every construction and deserialization path: all parameters in $(0,1)$ ; $\gamma < 0.5$ ; $\mu_r > \mu_w$ [src].
pathogen.jsonvalue bypasses estimation for that parameter. Estimation counts true substitutions only, because the decoder observes neither insertions nor deletions. Recombinants are rare in many viral species, so the expected switch rate is far below one per genome: each state transition costsParameter estimation in the dataset repository
scripts/recombination_paramsinnextclade_datacomputes the same three estimates from a dataset's reference tree and writes them into itspathogen.json, so that a dataset carries reviewed values. The test datasets of #464 carry values computed this way.Checks of the calls
The decoder marks every stretch of high mutation density, including short stretches next to missing data, stretches that are mostly
N, and whole divergent sequences or short fragments, where an all-recombinant path pays no switch cost. Nextclade reports a call only when the evidence is strong [src]:maxRegionMissingFraction(default 0.5), otherwise drop it when its span is belowminRegionLength(default 50)maxRecombinantFraction(default 2/3) of the alignment rangeOpt-in
Detection runs only for datasets that enable it with
recombination.enabled, because the model does not fit every pathogen (in HIV, the whole genome carries a high density of private mutations). Nextclade CLI overrides the dataset in both directions with--with-recombinationand--without-recombination; one function decides [src]. When detection is on, every reason that blocks it fails the dataset load with an error that names the cause [src]: no reference tree, an invalid setting, a parameter that the tree cannot estimate (for example fewer than two clades), or noqc.privateMutationsrule.Configuration
All settings sit in the
recombinationobject ofpathogen.json[src]. Values for SARS-CoV-2:{ "recombination": { "enabled": true, "gamma": 3.3e-7, "muW": 0.00017, "muR": 0.0061, "minRegionLength": 50, "maxRegionMissingFraction": 0.5, "maxRecombinantFraction": 0.667 } }enableddefaults tofalse; every other field is optional. Nextclade reports the effectiverecombinationParamsinnextclade.json; dataset curators copy reviewed values intopathogen.jsonto freeze them.🧪 Values set in the test datasets of #464
gammamuWmuRcommunity/UdeM-LMIVV/BabyV/PRRSV2/nsp3-4-5/Baby2026community/anses/swIAV/H1community/anses/swIAV/H3community/anses/swIAV/N1community/anses/swIAV/N2community/genspectrum/marburg/HK1980/all-lineagescommunity/isuvdl/mazeller/prrsv2/orf5/yimim2023community/itps/zikavcommunity/moncla-lab/iav-h5/ha/2.3.2.1community/moncla-lab/iav-h5/ha/2.3.4.4community/moncla-lab/iav-h5/ha/all-cladescommunity/neherlab/hiv-1/hxb2community/pathoplexus/cchfv/Scommunity/pathoplexus/yellow-fever-viruscommunity/v-gen-lab/chikV/genotypescommunity/v-gen-lab/dengue/denv1community/v-gen-lab/dengue/denv2community/v-gen-lab/dengue/denv3community/v-gen-lab/dengue/denv4enpen/enterovirus/cva10enpen/enterovirus/cva16enpen/enterovirus/ev-a71enpen/enterovirus/ev-d68nextstrain/flu/b/ha/KX058884nextstrain/flu/b/na/CY073894nextstrain/flu/h1n1pdm/ha/CY121680nextstrain/flu/h1n1pdm/ha/MW626062nextstrain/flu/h1n1pdm/na/MW626056nextstrain/flu/h3n2/ha/CY163680nextstrain/flu/h3n2/ha/EPI1857216nextstrain/flu/h3n2/na/EPI1857215nextstrain/flu/vic/ha/KX058884nextstrain/flu/vic/na/CY073894nextstrain/flu/yam/ha/JN993010nextstrain/hmpv/all-clades/NC_039199nextstrain/measles/N450/WHO-2012nextstrain/mpox/all-cladesnextstrain/mpox/clade-inextstrain/mpox/clade-iibnextstrain/mpox/lineage-b.1nextstrain/ndv/class-1/AB524405nextstrain/ndv/class-2/NC_075404nextstrain/orthoebolavirus/ebovnextstrain/rsv/a/EPI_ISL_412866nextstrain/rsv/b/EPI_ISL_1653999nextstrain/rubella/E1nextstrain/sars-cov-2/BA.2nextstrain/sars-cov-2/BA.2.86nextstrain/sars-cov-2/XBBnextstrain/sars-cov-2/wuhan-hu-1/orfsnextstrain/sars-cov-2/wuhan-hu-1/proteinsnextstrain/wnv/all-lineagesnextstrain/yellow-fever/prM-EOutput
Recombination is an observation about sequence origin, not a quality metric, so results go into dedicated output fields rather than the QC system. Without detection, the outputs carry no recombination fields.
JSON:
recombinationfield on each sequence result, omitted when the sequence has no call; the effective parameters once per run asrecombinationParams:{ "regions": [{ "range": { "begin": 100, "end": 200 }, "length": 100 }], "totalRegions": 1, "totalLength": 100, "longestRegion": { "range": { "begin": 100, "end": 200 }, "length": 100 } }TSV: dot-notation columns in a dedicated
Recombinationcategory (recombination.regions,recombination.totalRegions,recombination.totalLength,recombination.longestRegion.range,recombination.longestRegion.length), present only for datasets that run detection [src].Viewer
#8f2fd4fill,#e0b3ffborder) in all nucleotide views (absolute and relative)Rec.column in the results table, only for datasets that run detection, sortable by total recombinant length, with a tooltip showing region count, total length, longest region, and the region listDifferences from the prototype
Missingwith emission probability 1 instead of binaryMissingto prevent false calls at homoplasic positionsMissingstripped so reported ranges start and end at covered positionsTryFromin addition to range checksValidation
FN298942, a fragment that covers 479 of 7413 sites, loses its call: its rest scales by the fraction of the genome (threshold 5.7) instead of the fraction of the sequence (threshold 88.7)Work items
RecombinationRegionwith dot-notation TSV columns and aRec.table columnKnown issues
Possible improvements