View source: R/Celltype_Annotation_PerCell.R
| Celltype_Annotation_PerCell | R Documentation |
This function assigns SlimR per-cell predicted cell types directly to individual cells in a Seurat object's meta.data slot.
Celltype_Annotation_PerCell(
seurat_obj,
SlimR_percell_result,
plot_UMAP = TRUE,
annotation_col = "Cell_type_PerCell_SlimR",
plot_confidence = FALSE
)
seurat_obj |
A Seurat object. |
SlimR_percell_result |
List generated by Celltype_Calculate_PerCell() containing Cell_annotations data.frame with Cell_barcode and Predicted_cell_type columns. |
plot_UMAP |
Logical; if TRUE, plot the UMAP with cell type annotations. Default: TRUE. |
annotation_col |
Column name to write in meta.data. Default: "Cell_type_PerCell_SlimR". |
plot_confidence |
Logical; if TRUE, also plot a UMAP colored by confidence scores. Default: FALSE. |
A Seurat object with updated meta.data containing:
annotation_col: Predicted cell type for each cell
paste0(annotation_col, "_score"): Max score for each cell
paste0(annotation_col, "_confidence"): Confidence score for each cell
If plot_UMAP = TRUE, this function will print UMAP plot(s) as a side effect.
Other Section_3_Automated_Annotation:
Celltype_Annotation(),
Celltype_Calculate(),
Celltype_Calculate_PerCell(),
Celltype_Verification(),
Celltype_Verification_PerCell(),
Parameter_Calculate(),
percell_workflow
## Not run:
# Run per-cell annotation
result <- Celltype_Calculate_PerCell(
seurat_obj = sce,
gene_list = Markers_list,
species = "Human"
)
# Annotate Seurat object
sce <- Celltype_Annotation_PerCell(
seurat_obj = sce,
SlimR_percell_result = result,
plot_UMAP = TRUE,
annotation_col = "Cell_type_PerCell_SlimR"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.