destvi_utils.automatic_proportion_threshold
- destvi_utils.automatic_proportion_threshold(st_adata, kind_threshold='primary', output_file=None, ct_list=None, key_proportions='proportions', key_spatial='spatial')[source]
Function to compute automatic threshold on cell type proportion values. For further reference check [Lopez22].
- Parameters
- st_adata
Spatial sequencing dataset with proportions in obsm[‘proportions’] and spatial location in obsm[‘spatial’]
- kind_threshold
Which threshold value to use. Supported are ‘primary’, ‘secondary’. ‘min_value’ uses the minimum of primary and secondary threshold for each cell type.
- output_file
File where html output is stored. None means displaying the results and not storing them. Defaults to None.
- ct_list
Celltypes to use. Defaults to all celltypes.
- key_proportions
Obsm key pointing to cell-type proportions.
- key_spatial
Obsm key pointing to location of cells.
- Returns
ct_thresholds Dictionary containing all threshold values.