RCTD Algorithm

Purpose

Use RCTD for deconvolution-based cell annotation.

Usage

SDAS cellAnnotation rctd -i st.h5ad -o outdir --reference sc.h5ad --bin_size 20 --label_key annotation2 \
--filter_rare_cell 0

Input Parameter Description

Parameter
Required
Default
Description

-i / --input

Yes

Stereo-seq h5ad, must contain the raw expression matrix

-o / --output

Yes

Output folder

--reference

Yes

Single-cell ref h5ad, must contain the raw expression matrix

--label_key

Yes

Name of the column in single-cell ref h5ad.obs indicating cell type

--bin_size

Yes

Bin size, used to control the size of points in the plot, not used for calculation, e.g., 20, 50, 100, cellbin (equivalent to 20)

--input_layer

No

Layer in Stereo-seq h5ad storing raw counts

--ref_layer

No

Layer in single-cell ref h5ad storing raw counts

--input_gene_symbol_key

No

real_gene_name

Name of the column in Stereo-seq h5ad.var indicating gene symbol (index means using h5ad.var.index)

--ref_gene_symbol_key

No

_index

Name of the column in single-cell ref h5ad.var indicating gene symbol (_index means using h5ad.var.index)

--slice_key

No

sampleID

Name of the column in multi-slice h5ad.obs indicating slice ID, used for plotting

--filter_rare_cell

No

100

The minimum cell count for a cell type to be included

--mode

No

full

RCTD mode. Options: doublet, multi, full

--UMI_min

No

100

Spots with UMI count less than this value will be filtered out

--counts_MIN

No

10

Spots with gene count less than this value will be filtered out

--seed

No

42

Random seed

--n_cpus

No

8

Number of processes to use

Output Results

Result File
Description

<input_name>_anno_rctd.csv

Annotation results for each spot, including scores for each cell type

<input_name>_anno_rctd.h5ad

Input h5ad + annotation results. Scores for each cell type are stored in obsm['anno_score_rctd'], and the type with the highest score is stored in obs['anno_rctd']

<input_name>_anno_rctd.png/pdf

Overall annotation result plot; for multiple slices, one plot per slice; both png and pdf are output

<input_name>_anno_rctd_split.png/pdf

Separate display plot for each cell type; for multiple slices, one plot per slice; both png and pdf are output

<input_name>_anno_score_rctd.png/pdf

Score plot for each cell type; for multiple slices, one plot per slice; both png and pdf are output

For detailed explanations and specific result displays, please refer to the following link (cell2location algorithm → cell annotation → output results).

Last updated