Skip to content

Dependency proposal: hyalite for the CellRanger4 TSO clip #155

Description

@BenjaminDEMAILLE

Per CONTRIBUTING.md ("New dependencies need prior discussion"), raising this before opening a PR.

What needs it

--clipAdapterType CellRanger4 has two trims. #148 implements the 3' poly-A trim, which is scalar arithmetic. The 5' TSO trim is an overlap alignment of the template-switch oligo against the first 91 bases of the read, which STAR performs by linking Opal. That trim is the reason --clipAdapterType CellRanger4 is currently incomplete.

Proposal

hyalite (@Psy-Fer), as an optional dependency behind an off-by-default feature.

It fits the requirement exactly: overlap mode with affine gaps, ScoreEnd search, and a bit-identical-across-backends guarantee, which is what makes it usable here — the clip length feeds a coordinate, so a result that depends on which SIMD backend the CPU offers would make output machine-dependent. Its own benchmark is a CellRanger4-shaped overlap scan.

The parameters STAR uses (ClipCR4.cpp): match +1, mismatch -2, N-against-N 0, gap open and extend 2, target padded to 91 bases with N, OPAL_MODE_OV with OPAL_SEARCH_SCORE_END. All expressible through hyalite::Scoring and align_pair.

What needs deciding

It is not on crates.io yet. A git dependency blocks cargo publish, so the feature cannot be enabled in a published build until hyalite is released. Options, in the order I would rank them:

  1. Wait for a crates.io release, then add it as an optional dependency and finish the TSO trim.
  2. Add it now as an optional git dependency behind an off-by-default feature, and switch the source to crates.io when it is published. The default build and the published crate are unaffected either way, but the manifest carries a git URL in the meantime.
  3. Leave --clipAdapterType CellRanger4 doing only the poly-A trim, warning that the TSO trim is not applied.

Currently option 3 is what #148 does.

The dependency itself is pure Rust with no build-time C, no bindgen, and no system library, so it does not carry the supply-chain weight the CONTRIBUTING rule is mainly aimed at. The open question is timing and the git-source constraint, not the dependency's nature.

Happy to prepare the integration against whichever option you prefer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions