match_cluster

besca.tl.sig.match_cluster(adata: AnnData, obsquery: str, obsqueryval: str, obsref: str = 'leiden', cutoff=0.5) list[source]

Matches categories from adata.obs to each other. For a query category specified in obsquery and a value specified in obsqueryval, checks which clusters (or other adata.obs categories, obsref) contain >50% (or distinct cutoff, cutoff) of cells of the specified kind.

Parameters:
  • adata (AnnData) – AnnData object

  • obsquery ('str') – adata.obs category name used for querying

  • obsqueryval ('str') – adata.obs category name value, present in obsquery

  • obsref ('str') – adata.obs category name to be returned

  • cutoff ('numpy.float64') – fraction of positive cells returned

Returns:

a list of the cluster IDs that match the query label

Return type:

list