Build a cell2location Model
build_model_cell2location.Rd
Wraps the cell2location Python workflow via reticulate to train a reference model from single-cell data. Returns the trained model object.
Usage
build_model_cell2location(
single_cell_obj,
epochs = 250,
assay_sc = "counts",
batch_id_col = "sample_id",
cell_type_col = "celltype_major",
cell_count_cutoff = 5,
cell_percentage_cutoff = 0.03,
nonz_mean_cutoff = 1.12,
gpu = TRUE
)
Arguments
- single_cell_obj
-
SingleCellExperimentcontaining reference expression. - epochs
Number of training epochs.
- assay_sc
Single-cell assay to use.
- batch_id_col
Batch ID column name.
- cell_type_col
Column with cell type labels.
- cell_count_cutoff
cell2location parameter.
- cell_percentage_cutoff
cell2location parameter.
- nonz_mean_cutoff
cell2location parameter.
- gpu
Logical; whether to train on GPU.