Restore Bioconductor-compatible QScore APIs - #66
Merged
Conversation
…d stats::terms import
drighelli
requested review from
drisso
and removed request for
BenedettaBanzi and
drisso
July 29, 2026 20:48
drighelli
marked this pull request as ready for review
July 31, 2026 21:43
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.
Summary
This restores the published QScore API contract while retaining the revised QScore implementation introduced by PRs #64 and #65.
computeQScore(),computeQScoreFlags(),computeOutliersQScore(), andapplyQScoreModel()getModelFormula()argument compatibilitycomputeLambda(trainDF, modelFormula)and moves matrix-based work to an internal helperCustom formula training labels
For a custom
modelFormula, its supported base QC metrics now determine outlier computation, good/bad training-cell selection, andQScore_train, as well as the fitted model. Interactions do not add training metrics. In the CosMx border expression,log2AspectRatiois the training metric anddist_borderremains an auxiliary variable.The default
modelFormula=NULLworkflow, 0.1% outlier threshold, and intercept policy are unchanged.Compatibility details
Supported formula predictors are
log2SignalDensity,Area_um,log2AspectRatio, andlog2Ctrl_total_ratio. The CosMx-only border expression remains technology-gated.The intercept policy is intentionally unchanged and remains a follow-up item.
Validation
modelFormulatests: passedQCScorestests: passeddevtools::test()suite: passedR CMD build --no-build-vignettes: passed for version 1.1.9BiocCheck::BiocCheckGitClone(): 0 errors, 0 warnings, 0 notesdevtools::check(),R CMD check, and install-dependent tarball BiocCheck are blocked because the local machine has R 4.5.1 while the package correctly declares R >= 4.6.0 for current Bioconductor develR CMD checkpassed examples, tests, vignettes, and the PDF manual, with one environmental dependency patch-version warningVersioning
Version 1.1.9 assumes this branch is squash-merged. If commits are imported individually into the Bioconductor devel repository, the
zcomponent should instead be advanced per imported commit.