scmorph.pp.select_features#
- scmorph.pp.select_features(adata, method='pearson', cor_cutoff=0.9, fraction=None, n_obs=None, copy=False)#
Feature selection
Select features by feature correlations. Allows measuring correlation on a subset of cells to speed up computations. See
fractionandn_obsfor details.- Parameters:
adata (
AnnData) – The (annotated) data matrix of shapen_obs×n_vars. Rows correspond to cells and columns to genes.method (
str(default:'pearson')) – Which correlation coefficient to use for filtering. One of “pearson”, “spearman” and “chatterjee” ([[Lin and Han, 2021]]_)cor_cutoff (
float(default:0.9)) – Cutoff beyond which features with a correlation coefficient higher than it are removed. Must be between 0 and 1.fraction (float) – Subsample to this
fractionof the number of observations.n_obs (
Optional[int] (default:None)) – Subsample to this number of observations.copy (
bool(default:False)) – Whether to return a copy or modifyadatainplace (i.e. operate inplace)
- Return type:
AnnData|None- Returns:
adata Feature correlations saved in
.varmslot and feature selection saved in.varslot.