destvi_utils.automatic_proportion_threshold

destvi_utils.automatic_proportion_threshold(st_adata, kind_threshold='primary', output_file=None, ct_list=None)[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.

Returns

ct_thresholds Dictionary containing all threshold values.