scverse / scverse/rapids-singlecell
[FEA] Dask Array Support for rsc.pp.scrublet: A Straightforward implementation
Open
enhancement
- Dominant language
- Python
- Stars
- 394
- Forks
- 52
- Avg merge
- 22h 5m
- Merged PRs (30d)
- 20
Description
Right now, rsc.pp.scrublet doesn't support Dask arrays, and there's a relatively straightforward path to implement one (at least, from what I know).
Background:
- Scrublet only really needs to run within a sample, or batch. This is provided to the function as a 'batch_key'
- These samples/batches are typically on the order of < 100k cells for batches, or < 10,000 for samples, meaning that they can fit within a typical GPU's memory.
Implementation concept:
- Check the the anndata object has a Dask array. If so, require a batch_key be provided.
- Rechunk the dask array by batch_key - one dask array for each batch_key
- Run scrublet in memory on each GPU (.compute_chunk_sizes())
- Save results in obs as normal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the rsc.pp.scrublet entry point and inspect how it currently handles AnnData inputs and batch_key. Check the linked pull request before starting, then verify that Dask-backed arrays are processed per batch and that scrublet results are saved in obs as usual.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100