Skip to content

qcatch: Add scikit-image dependency and enable doublet detection tests#10125

Merged
DongzeHE merged 4 commits intonf-core:masterfrom
an-altosian:qcatch-scikit-image
Feb 21, 2026
Merged

qcatch: Add scikit-image dependency and enable doublet detection tests#10125
DongzeHE merged 4 commits intonf-core:masterfrom
an-altosian:qcatch-scikit-image

Conversation

@an-altosian
Copy link
Contributor

@an-altosian an-altosian commented Feb 21, 2026

Summary

  • Add scikit-image==0.26.0 as a pip dependency in environment.yml — required by scanpy.pp.scrublet() for doublet detection when no explicit threshold is provided
  • Update container images to include scikit-image (pip_qcatch_scikit-image variants)
  • Enable --remove_doublets --visualize_doublets flags in test config to exercise the Scrublet doublet detection code path

Test plan

  • nf-test passes locally with Docker (both real test and stub)
  • Ran twice to confirm deterministic h5ad output
  • CI passes all shards (docker, conda, singularity)

🤖 Generated with Claude Code

scikit-image is required by scanpy.pp.scrublet() for doublet detection
when no explicit threshold is provided. Updated container images to
include scikit-image==0.26.0 and enabled --remove_doublets
--visualize_doublets in the test config to exercise this code path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DongzeHE DongzeHE self-assigned this Feb 21, 2026
Split tests into: (1) base test without doublet args using deterministic
md5 snapshots, (2) doublet detection test with --remove_doublets
--visualize_doublets that validates output file existence. Both tests
exercise the scikit-image dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DongzeHE DongzeHE self-requested a review February 21, 2026 20:45
an-altosian and others added 2 commits February 21, 2026 20:46
Doublet detection (scrublet) is deterministic with default random_state=0,
so use one test with --remove_doublets --visualize_doublets and md5
snapshots for all outputs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scrublet doublet detection produces different numerical results across
CPU architectures (BLAS/LAPACK differences), causing h5ad md5 mismatches
between local and CI. Remove --remove_doublets --visualize_doublets from
test config to keep deterministic md5 snapshots. scikit-image dependency
is still included in the container for users who need doublet detection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member

@DongzeHE DongzeHE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DongzeHE DongzeHE added this pull request to the merge queue Feb 21, 2026
Merged via the queue into nf-core:master with commit 87c8937 Feb 21, 2026
18 checks passed
an-altosian added a commit to an-altosian/scrnaseq that referenced this pull request Feb 21, 2026
…itespace

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@mashehu mashehu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the tests for the functionality in the last commit? If the content is unstable we still have ways to test the functionality https://nf-co.re/docs/contributing/nf-test/assertions#nf-core-guidelines-for-assertions please add the test back to ensure that this functionality will not be broken again in the future

@an-altosian
Copy link
Contributor Author

an-altosian commented Feb 22, 2026

@mashehu Good point, thanks for the link! Added the doublet detection test back (test_qcatch - remove_doublets) using the nf-core assertion guidelines for non-deterministic outputs:

  • { assert process.success }
  • File size > 0 checks for report, h5ad, and CSV (scrublet's numerical results vary across CPU architectures due to BLAS/LAPACK differences)
  • snapshot(process.out.versions).match() for the deterministic versions.yml

The base test without doublet args keeps full md5 snapshots for h5ad and CSV.

PR #10126

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants