hucira.create_celltype_combos

hucira.create_celltype_combos#

hucira.create_celltype_combos(adata_celltypes=None, hcd_celltypes=None)#

Reformat cell-type names for run_one_enrichment_test().

Creates a celltype_combos list of tuples that matches cell types of the query adata to the closest available cell types from the human cytokine dictionary. The lists and their order have to be manually prepared to fit/match. This is just a helper – the list can be manually curated.

Parameters:
  • adata_celltypes (list of str or None) – Ordered cell types of interest from the adata object (matching hcd_celltypes).

  • hcd_celltypes (list of str or None) – Ordered cell types of interest from the human cytokine dictionary (matching adata_celltypes).

Return type:

list[tuple[str, str]] | None

Returns:

list of tuple A list of matched cell-type pairs, e.g. [('B cell', 'B'), ('CD4-positive, alpha-beta T cell', 'CD4'), ...].