mmc.Hierarchy.run_all_thresholds()
-
Hierarchy.run_all_thresholds(adata, data_key=utils.DATA_KEY, batch_key=None, mode='fill in', interactive=True, plot=True, limit=None, batch_marker_order=False, skip=[]) Runs thresholding using the thresholding.threshold() function. First uses mmc.get_data to search for marker. If marker is not found in AnnData, gives up and ask whether to label it as interactive or not.
Parameters: - adata (
AnnData) – Object containing marker expression in the .X, .obsm[data_key], or .obs for high confidence thresholding. - data_key (
str(default:utils.DATA_KEY)) – obsm location to probe for other modalities beyond the .X - batch_key (
Optional[str] (default:None)) – If none, don’t run with batch. Otherwise, the batch on which to threshold - mode (
str(default:'fill in')) – One of: [‘fill in’,’rerun all’, ‘rerun specified’,’every level’] Whether to only fill in unspecified thresholds, rerun all thresholds, rerun all thresholds that have been specified (and not fill in new ones), or rerun every level separately. Add “fancy” to the mode name to trigger fancy plots (interactive widgets). - interactive (
bool(default:True)) – Whether to run thresholding.threshold() interactively or not - plot (
bool(default:True)) – Whether to display a plot when running thresholding.threshold() - limit (
Union[str,List[str],None] (default:None)) – If specified, only thresholds marker(s) included in the limit - batch_marker_order (
bool(default:False)) – Whether to order by batch first or marker first (as the outer loop). If true, marker is the outer loop. - skip (
List[str] (default:[])) – Markers to skip for thresholding
- adata (