scverse / scverse/scanpy

min_in_group_fraction in filter_rank_genes_groups doesn't work as expected

Open
#1,495 1 comment 1 reaction 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

the default value of min_in_group_fraction is 0.25, which I understand is filter those genes that has less than 25 percent present in the group.

I use min_in_group_fraction = 0, max_in_group_fraction=1.01 to try to filter everything just by foldchange and adj_p value, but it doesn't add any gene when comparing to min_in_group_franction=0.25,

in my test, if I filter on rank_gene_groups by foldchange and adj_p, I got 87 genes back. but if I try mini_in_group_franction=0 in filter_ranK_gene_groups, I only get 25 back.

I notice an issue https://github.com/theislab/scanpy/issues/863 that mentionthat rank_gene_groups and filter_rank_gene_groups calculate fold change differently, was wondering

  1. why
  2. this doesn't explain the huge difference between numbers of gene returned by different filter method.

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 filter_rank_genes_groups and rank_gene_groups entry points described in the issue, reproducing the comparison with min_in_group_fraction=0 and max_in_group_fraction=1.01. Trace how fold change, adjusted p-values, and group fractions are calculated; done means the filtering behavior matches the documented parameter semantics and the discrepancy is explained or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.