scverse / scverse/scanpy

cell_ranger HVG flavor inconsistent with 10x code

Open
#969 2 comments 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

It appears that in the cell ranger code, the dispersion is calculated using the negative binomial relationship between mean and dispersion, see

https://github.com/10XGenomics/cellranger/blob/5f5a6293bbc067e1965e50f0277286914b96c908/lib/python/cellranger/analysis/stats.py#L44

Furthermore, these summary statistics are calculated on the count matrix normalized by library size, but not log-transformed.

https://github.com/10XGenomics/cellranger/blob/5f5a6293bbc067e1965e50f0277286914b96c908/lib/python/cellranger/analysis/pca.py#L91-L95.

As a follow-up, the "Seurat" flavor seems to be no longer used in Seurat. Any plans to implement their "vst" 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

Compare the referenced cellranger stats.py and pca.py implementations, then trace Scanpy's current highly-variable-gene implementation and its existing flavor tests. Define the desired Cell Ranger-compatible normalization and dispersion behavior, and consider the requested Seurat vst method; done means the selected flavor matches the intended method and tests cover its results.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.