pycdr.utils.filter_genecounts_percent

pycdr.utils.filter_genecounts_percent(adata, cell_fraction, median_count_above_zero)

filter function for counts

implements a gene count filter based on percentage of cells and median count, as per SCENIC.

Parameters
  • adata – anndata object to be filtered

  • pheno – phenotype to filter on

  • percent_cells – the percent of cells which should contain the gene for total gene filtering

  • small_pheno_frac – the fraction of the smallest phenotype containing the gene

  • count_above_zero – count above the median that is used for total gene filtering

Returns

adata: filtered anndata object