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:
- Wait for a crates.io release, then add it as an optional dependency and finish the TSO trim.
- 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.
- 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.
Per CONTRIBUTING.md ("New dependencies need prior discussion"), raising this before opening a PR.
What needs it
--clipAdapterType CellRanger4has 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 CellRanger4is 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,
ScoreEndsearch, 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-N0, gap open and extend2, target padded to 91 bases withN,OPAL_MODE_OVwithOPAL_SEARCH_SCORE_END. All expressible throughhyalite::Scoringandalign_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:--clipAdapterType CellRanger4doing 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.