tirank.SCSTpreprocess.FilteringAnndata

tirank.SCSTpreprocess.FilteringAnndata(adata, max_count=35000, min_count=5000, MT_propor=10, min_cell=10, imgPath='./')[source]

Filters an AnnData object based on QC metrics.

Filters cells/spots based on total counts and mitochondrial percentage. Filters genes based on minimum cell count. Also saves a QC violin plot.

Parameters:
  • adata (sc.AnnData) – The AnnData object to filter.

  • max_count (int, optional) – Maximum total counts per cell/spot. Defaults to 35000.

  • min_count (int, optional) – Minimum total counts per cell/spot. Defaults to 5000.

  • MT_propor (int, optional) – Maximum percentage of mitochondrial gene counts. Defaults to 10.

  • min_cell (int, optional) – Minimum number of cells/spots a gene must be expressed in. Defaults to 10.

  • imgPath (str, optional) – Path to save the QC violin plot. Defaults to “./”.

Returns:

The filtered AnnData object.

Return type:

sc.AnnData