Regressing out genes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
In Seurat, there is an option of selecting a list of genes in the pre-processing regressOut function. I was wondering if there was similar functionality in Scanpy. Doing something like below does not work for me as a lot of the cells have 0 expression, giving me a PerfectSeparationError.
adata.obs[gene] = adata[:, adata.var_names==gene].X
sc.pp.regress_out(adata,gene)
Any help would be appreciated. Thank you!
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 at the sc.pp.regress_out entry point and reproduce the issue with the provided adata.obs assignment and gene argument. Determine whether regressing out a gene with many zero-expression cells is supported; done means the requested gene-level regression works without PerfectSeparationError or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100