scverse / scverse/scanpy

Specify var subsets for stats testing

Open
#1,744 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

Hi authors,

First off, love scanpy. Big fan.

I was just wondering if you have considered including an option in scanpy.tl.rank_genes_groups to specify which variables to select for testing, allowing users to select a subset of variables which would or would not be considered in the statistical test.

For context, I'm trying to test between groups of cells while ignoring ribosomal / mitochondrial genes, but retain them in the .var and .X objects for downstream analysis/visualisation. Making a temp object with these variables removed solely for stats testing partially works, but it's confounded by having to further apply the boolean slice to the .raw object as well.

Thanks, K

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the scanpy.tl.rank_genes_groups entry point and its documentation, tracing how variables and the .raw object are selected for testing. Clarify the intended subset semantics and identify the relevant tests; done means users can exclude or include selected variables for statistical testing without removing them from .var, .X, or downstream visualization data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.