question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

counts_per_cell has no effect on pp.normalize_per_cell(adata)

See original GitHub issue

counts_per_cell has no effect on pp.normalize_per_cell(adata) as it is overwritten here:

https://github.com/theislab/scanpy/blob/e0d2ea60fa2394f1158618bc69dff4fc639b51c4/scanpy/preprocessing/_simple.py#L599

Would be great if one could use, e.g. the initial cell size (from before filtering). Note, that this issue only holds when passing AnnData. With AnnData.X it works fine.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:23 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
LuckyMDcommented, Jul 15, 2020

Indeed, scran often works better than CPM normalization. I would recommend to use it via anndata2ri or rpy2 as I demonstrate in the case study with the paper. You can find that [here] (https://github.com/theislab/single-cell-tutorial/blob/master/latest_notebook/Case-study_Mouse-intestinal-epithelium_1906.ipynb)

1reaction
LuckyMDcommented, Mar 5, 2019

I will put it on my long list of potential HiWi topics…

Read more comments on GitHub >

github_iconTop Results From Across the Web

counts_per_cell has no effect on pp.normalize_per_cell(adata)
My use case: I have found that, in the context of RNA velocity analysis, normalizing by initial sizes (cell sizes before filtering) can...
Read more >
notebook 1 - introduction and data processing - GitHub Pages
This notebook will introduce you to single cell RNA-seq analysis using scanpy. It will walk you through the main steps of an analysis...
Read more >
scanpy.pp.normalize_per_cell - Read the Docs
If None , after normalization, each cell has a total count equal to the median of the counts_per_cell before normalization. Precomputed counts per...
Read more >
Scanpy normalize per cell. normalize_per_cell(adata ...
Our next goal is to identify genes with the greatest amount of variance (i. counts_per_cell: Optional [ndarray] (default: None) Precomputed counts per cell....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found