Option to return sparse arrays from `sc.get.aggregate`
Open
@Intron7 is already working on this.
Since Jan 23, 2025.
Area – API
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
What kind of feature would you like to request?
Additional function parameters / changed functionality / changed defaults?
Please describe your wishes
@Intron7, found a use case 😆
It could be nice for sc.get.aggregate to be able to return sparse matrices where we don't expect the aggregation to return very dense data.
Previously discussed in:
Usecases include:
- Taking the
maxfor multiple reports of a genes (sc.get.aggregate(adata, "probe_target", "max"), e.g. https://discourse.scverse.org/t/merging-identical-genes-from-10x-fixed-scrna/2142)- (note: max is not currently implemented)
- Small aggregations, e.g. only summing neighbors
This would require both api design choices for what the argument is called, and efficient implementations for both dense and sparse results (python-graphblas could be useful here)
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.
Assessment
This issue has not been assessed yet.