sopa.annotation
sopa.annotation.tangram_annotate(sdata, adata_sc, cell_type_key, reference_preprocessing=None, bag_size=10000, max_obs_reference=10000, **kwargs)
Tangram multi-level annotation. Tangram is run on multiple bags of cells to decrease the RAM usage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sdata |
SpatialData
|
A |
required |
adata_sc |
AnnData
|
A scRNAseq annotated reference |
required |
cell_type_key |
str
|
Key of |
required |
reference_preprocessing |
str
|
Preprocessing method used on the reference. Can be |
None
|
bag_size |
int
|
Size of each bag on which tangram will be run. Use smaller bags to lower the RAM usage |
10000
|
max_obs_reference |
int
|
Maximum number of cells used in |
10000
|
Source code in sopa/annotation/tangram/run.py
sopa.annotation.higher_z_score(adata, marker_cell_dict, cell_type_key='cell_type')
Simple channel-based segmentation using a marker-to-population dictionary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
An |
required |
marker_cell_dict |
dict
|
Dictionary whose keys are channels, and values are the corresponding populations. |
required |
cell_type_key |
str
|
Key of |
'cell_type'
|
Source code in sopa/annotation/fluorescence.py
sopa.annotation.preprocess_fluo(adata)
Preprocess fluorescence data. For each column \(X\), we compute \(asinh(\frac{X}{5Q(0.2, X)})\) and apply standardization
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
An |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A dataframe of preprocessed channels intensities |