Initial gene filtering

Show and apply gene filtering

cell2location.utils.filtering.filter_genes(adata, cell_count_cutoff=15, cell_percentage_cutoff2=0.05, nonz_mean_cutoff=1.12)[source]

Plot the gene filter given a set of cutoffs and return resulting list of genes.

Parameters
  • adata – anndata object with single cell / nucleus data.

  • cell_count_cutoff – All genes detected in less than cell_count_cutoff cells will be excluded.

  • cell_percentage_cutoff2 – All genes detected in at least this percentage of cells will be included.

  • nonz_mean_cutoff – genes detected in the number of cells between the above mentioned cutoffs are selected only when their average expression in non-zero cells is above this cutoff.

Returns

Return type

a list of selected var_names