mmc.run_threshold()
-
mmochi.thresholding.run_threshold(markname, adata, data_key, thresh) Lightweight wrapper to find the marker (utils.get_data()), then performs pos/neg/? thresholding on all events in the AnnData, given a list of positive and negative thresholds.
Parameters: - markname (
str) – Name of the marker to threshold - adata (
AnnData) – AnnData object containing normalized (and possibly batch corrected) events for thresholding - data_key (
Optional[str]) – Name of the key in .obsm[] to look for when searching for markname - thresh (
Sequence[Union[int,float]]) – Upper and lower thresholds to apply for positive and negative populations (no specific order needed)
Returns: 1D array that is the length of the adata, with “pos” if data is >= to the upper threshold, “neg” if <= lower threshold, and “?” if in between upper and lower
Return type: np.array
- markname (