You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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”).
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.
Activity
JiwaniZakir commentedon Apr 16, 2026
flying-sheep commentedon Apr 17, 2026
@JiwaniZakir please stop with the spammy LLM comments. I think this is the second time I’m telling you.
JiwaniZakir commentedon Apr 17, 2026
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 themask_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.layerparameter toread_10x_*functions #4071flying-sheep commentedon Apr 17, 2026
Not any further than it is, because both of these are already in place! The current default for
use_repisAnd the default for
mask_varin 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 setmask_var=Nonemanually if you really want”).JiwaniZakir commentedon Apr 17, 2026
For
tie_correct=TrueinRankGenesGroupsPreset, 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=Falseas a hard default (or removinguse_rawentirely in 2.0), since relying on.rawis a footgun that confuses newer users and conflicts with thelayer-based workflow being standardized here.flying-sheep commentedon Nov 10, 2026
OK, done in #4504!