Skip to content

Opinionated defaults for 2.0 #4008

Open
0 of 1 issue completed
Open

Description

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. self-assigned this
    on Apr 2, 2026
  2. JiwaniZakir commented on Apr 16, 2026

    @JiwaniZakir
  3. flying-sheep commented on Apr 17, 2026

    @flying-sheep
    MemberAuthor

    @JiwaniZakir please stop with the spammy LLM comments. I think this is the second time I’m telling you.

  4. moved this from Todo to In Progress in scanpy 2.0on Apr 17, 2026
  5. JiwaniZakir commented on Apr 17, 2026

    @JiwaniZakir

    Another candidate worth considering: use_rep="X_pca" as the default for neighborhood graph computation (pp.neighbors), since PCA is almost universally the preceding step anyway. On the mask_var="highly_variable" for PCA — that one feels particularly impactful since running PCA on all genes is a common footgun for new users. Both of those together would meaningfully shorten the standard preprocessing workflow.

  6. flying-sheep commented on Apr 17, 2026

    @flying-sheep
    MemberAuthor

    Both of those together would meaningfully shorten the standard preprocessing workflow.

    Not any further than it is, because both of these are already in place! The current default for use_rep is

    For .n_vars < scanpy.settings.N_PCS (default: 50), .X is used, otherwise 'X_pca' is used. If 'X_pca' is not present, it’s computed with default parameters or n_pcs if present.

    And the default for mask_var in PCA is 'highly_variable' if 'highly_variable' in adata.var else None.

    The only question is if we should be more explicit, i.e. set it to a hard 'highly_variable' and fail with an error if that doesn’t exist (with a nice error message about “you can just set mask_var=None manually if you really want”).

  7. JiwaniZakir commented on Apr 17, 2026

    @JiwaniZakir

    For tie_correct=True in RankGenesGroupsPreset, the performance cost is usually negligible for typical dataset sizes, so making it the default seems like a safe improvement to statistical correctness. One additional candidate worth considering: use_raw=False as a hard default (or removing use_raw entirely in 2.0), since relying on .raw is a footgun that confuses newer users and conflicts with the layer-based workflow being standardized here.

  8. flying-sheep commented on Nov 10, 2026

    @flying-sheep
    MemberAuthor

    OK, done in #4504!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area – API

Projects

  • Status
    In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions