Skip to content

Support multiple ITSx profile sets with per-read best-match selection (-t all equivalent) #7

Description

@ayobi

Requested by @vmikk in #5. Splitting it out since the SSU/LSU half of that issue shipped in v0.3.0 and this part needs its own design discussion.

What's wanted

ITSx's -t all searches every taxonomic profile set and reports a preliminary origin per sequence. ITSxRust currently takes a single --hmm file, so a mixed eukaryotic community amplified with universal primers gets delimited against one profile set regardless of what each read actually is.

Design notes

A single concatenated search looks preferable to N separate nhmmer passes. ITSx profile names already carry the taxonomic group:

1_SSU_Fungi_Ge_1_SSU_end_five_long
2_5.8_Fungi_Ge_58S_start_onee_long
3_End_Fungi_Ge_58S_end_oneg_long
4_LSU_Fungi_Ge_4_LSU_start_five_long

So one pass over a merged HMM file would let select::classify bin hits by both anchor type and group, at roughly the cost of one search rather than one per set.

Open questions:

  • Selection criterion. Summed anchor bitscore across the four anchors is the obvious choice, but profile sets differ in model count and model length, so a set with more or longer models may win systematically. This needs checking against sequences of known origin before it can be trusted.
  • Ties and mixed evidence. What to do when two sets score comparably, or when the SSU anchor favours one group and the LSU another. The latter is a chimera signal worth surfacing rather than silently resolving.
  • Reporting. The winning group should appear per read in the anchors TSV and be summarised in the QC JSON, consistent with the existing diagnostics.
  • Memory. Top-K is currently tracked per anchor type per strand. Adding a group dimension multiplies the accumulator, which matters now that peak memory scales at roughly 10 kB per read.
  • Backwards compatibility. A single --hmm file should keep working unchanged; multi-set behaviour should be opt-in.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions