zoom.sc_tool.preprocess

zoom.sc_tool.preprocess(adata: anndata.AnnData, QC: bool, min_genes: int, min_cells: int, d: int, expression: pandas.DataFrame, DS: PathLike | pandas.DataFrame) anndata.AnnData[source]

Calculates the gene expression rank for each cell.

Parameters:
  • adata (ad.AnnData) – The AnnData object containing expression data. - adata.X should contain the raw or normalized expression data.

  • QC (bool) – If True, filter low-quality genes and cells through scanpy - sc.pp.filter_cells(adata, min_genes=min_genes) - sc.pp.filter_genes(adata, min_cells=min_cells)

  • d (int) – Number of nearest neighbors for each cell.

  • expression (pd.DataFrame) – The AHBA gene expression matrix.

  • DS (pd.DataFrame) – Gene-level differential stability(DS).

Returns:

  • adata (ad.AnnData) – The AnnData object containing common genes only and gene-level differential stability information.

  • expression (pd.DataFrame) – The AHBA gene expression containing common genes only.