mmc.umap_thresh()

mmochi.utils.umap_thresh(adata, h, markers=None, batch_key=BATCH_KEY, data_key=DATA_KEY, umap_basis='X_umap', cmap=None, external_holdout=False, key_added='lin', **kwargs)

Plots UMAPs for the listed markers with thresholded expression data for the markers overlayed on top. This visualization can be useful to see where protein and genes are expressed in the UMAP.

Parameters:
  • adata (AnnData) – Object with .obsm[‘X_umap’] with UMAP representation and thresholds to color the umap

  • h – hierarchy object to draw classification markers from

  • markers (Union[str, List[str]] (default: None)) – Marker(s) to create UMAPs for If None (default), creates UMAP for all markers in h

  • batch_key (str (default: BATCH_KEY)) – Name of batch in adata to use for UMAP, uses batch_iterator to find key

  • data_key (Union[str, list, None] (default: DATA_KEY)) – Location in the .obsm and .var[MODALITY_COLUMN] to look for marker name If None, searches adata.var_names

  • umap_basis (str (default: 'X_umap')) – Passed to scanpy.pl.embedding as basis

  • cmap (Optional[List[str]] (default: None)) – List of colors or color map information used to color the feature expression on the UMAP

  • external_holdout (bool (default: False)) – If external hold out was defined in adata.obsm[key_added], removes external hold out from automatic threshold calculations and from graphs used for manual thresholding

  • key_added (str (default: 'lin')) – If external_holdout is true, the place in adata.obsm[key_added] to search for the external hold out column (bool T F column used to indicate whether an event should be set aside for hold out)

  • kwargs – Arguments to be passed to scanpy.pl.embedding