scAnnotatR: scAnnotatR class.

View source: R/class.R

scAnnotatRR Documentation

scAnnotatR class.

Description

This class is returned by the train_classifier function. Generally, scAnnotatR objects are never created directly.

Usage

scAnnotatR(cell_type, caret_model, marker_genes, p_thres, parent)

scAnnotatR(cell_type, caret_model, marker_genes, p_thres, parent)

Arguments

cell_type

character. Name of the cell type.

caret_model

list. Trained model returned by caret train function.

marker_genes

vector/character containing marker genes used for the training.

p_thres

numeric. Probability threshold for the cell type to be assigned for a cell.

parent

character. Parent cell type.

Value

A scAnnotatR object.

Slots

cell_type

character. Name of the cell type.

caret_model

list. Trained model returned by caret train function.

marker_genes

vector/character containing marker genes used for the training.

p_thres

numeric. Probability threshold for the cell type to be assigned for a cell.

parent

character. Parent cell type.

Examples

# load small example dataset
data("tirosh_mel80_example")

# train a classifier, for ex: B cell
selected_marker_genes_B = c("CD19", "MS4A1", "CD79A")
set.seed(123)
classifier_b <- train_classifier(train_obj = tirosh_mel80_example,
assay = 'RNA', slot = 'counts', marker_genes = selected_marker_genes_B, 
cell_type = "B cells", tag_slot = 'active.ident')

classifier_b

grisslab/scAnnotatR documentation built on March 20, 2023, 2:42 a.m.