swnn.groupwise_hvgs_freq

swnn.groupwise_hvgs_freq(adata, groupby='batch', return_hvgs=True, **hvg_kwds)

Separately compute highly variable genes (HVGs) for each group, and count the frequencies of genes being selected as HVGs among those groups.

Parameters
  • adata – the AnnData object

  • groupby – a column name in adata.obs specifying batches or groups that you would like to independently compute HVGs.

  • return_hvgs (bool) – whether to return the computed dict of HVG-lists for each group

  • hvg_kwds – Other Parameters for sc.pp.highly_variable_genes

Returns

  • hvg_freq (dict) – the HVG frequencies

  • hvg_dict (dict) – returned only if return_hvgs is True