[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scanpy legacy and not legacy about scale #3095

Closed
2 of 3 tasks
asmlgkj opened this issue Jun 4, 2024 · 2 comments
Closed
2 of 3 tasks

scanpy legacy and not legacy about scale #3095

asmlgkj opened this issue Jun 4, 2024 · 2 comments
Labels

Comments

@asmlgkj
Copy link
asmlgkj commented Jun 4, 2024

Please make sure these conditions are met

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the main branch of scanpy.

What happened?

Thanks a lot
when I read docs in
https://scanpy.readthedocs.io/en/stable/tutorials/basics/clustering-2017.html (legacy, used pp.scale)
https://scanpy.readthedocs.io/en/stable/tutorials/basics/clustering.html#nearest-neighbor-graph-constuction-and-visualization ( not used pp.scale)

so does it mean in scanpy, not matther single-cell rna-seq or spatial data, both not need the pp.scale

Minimal code sample

no code

Error output

No response

Versions

[
<img width="968" alt="Snipaste_2024-06-04_22-02-31" src="https://github.com/scverse/scanpy/assets/50854682/6c232732-bbc9-47b2-8f44-5ccbe63cd891">
](url)
@asmlgkj asmlgkj added Bug 🐛 Triage 🩺 This issue needs to be triaged by a maintainer labels Jun 4, 2024
@flying-sheep
Copy link
Member
flying-sheep commented Jun 7, 2024

Please ask questions on https://discourse.scverse.org/

See the Note in the 2017 tutorial:

Note

If you don’t proceed below with correcting the data with sc.pp.regress_out and scaling it via sc.pp.scale, you can also get away without using .raw at all.

The result of the previous highly-variable-genes detection is stored as an annotation in .var.highly_variable and auto-detected by PCA and hence, sc.pp.neighbors and subsequent manifold/graph tools. In that case, the step actually do the filtering below is unnecessary, too.

Since data sizes these days are big enough that a sparse .X is all but necessary (pp.scale densifies data), and methods exist that work with unscaled expression values and therefore don‘t need scaling, people tend to not do it these days.

@flying-sheep flying-sheep added Question and removed Bug 🐛 Triage 🩺 This issue needs to be triaged by a maintainer labels Jun 7, 2024
@asmlgkj
Copy link
Author
asmlgkj commented Jun 10, 2024

but we still need to deal with many old singcell data, which may bot contain that many cells or not tat big enough, so can I scale all the time, no matter it is big or small

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants