Uses "marker_list" to calculate probability, prediction results, AUC and generate heatmap for cell annotation
Celltype_Calculate(
seurat_obj,
gene_list,
species,
cluster_col = "seurat_clusters",
assay = "RNA",
min_expression = 0.1,
specificity_weight = 3,
threshold = 0.8,
compute_AUC = TRUE,
plot_AUC = TRUE,
AUC_correction = TRUE,
colour_low = "navy",
colour_high = "firebrick3"
)
A list containing:
Expression_list: List of expression matrices for each cell type
Proportion_list: List of proportion of expression for each cell type
Expression_scores_matrix: Matrix of expression scores
Probability_matrix: Matrix of normalized probabilities
Prediction_results: Data frame with cluster annotations including:
cluster_col: Cluster identifier
Predicted_cell_type: Primary predicted cell type
AUC: Area Under the Curve value (when compute_AUC = TRUE)
Alternative_cell_types: Semi-colon separated alternative cell types
Heatmap_plot: Heatmap visualization of probability matrix
AUC_plot: AUC visualization of Predicted cell type
Enter the Seurat object with annotation columns such as "seurat_cluster" in meta.data to be annotated.
A list of cells and corresponding gene controls, the name of the list is cell type, and the first column of the list corresponds to markers. Lists can be generated using functions such as "Markers_filter_Cellmarker2 ()", "Markers_filter_PanglaoDB ()", "read_excel_markers ()", "read_seurat_markers ()", etc.
This parameter selects the species "Human" or "Mouse" for standard gene format correction of markers entered by "Marker_list".
Enter annotation columns such as "seurat_cluster" in meta.data of the Seurat object to be annotated. Default parameters use "cluster_col = 'seurat_clusters'".
Enter the assay used by the Seurat object, such as "RNA". Default parameters use "assay = 'RNA'".
The min_expression parameter defines a threshold value to determine whether a cell's expression of a feature is considered "expressed" or not. It is used to filter out low-expression cells that may contribute noise to the analysis. Default parameters use "min_expression = 0.1".
The specificity_weight parameter controls how much the expression variability (standard deviation) of a feature within a cluster contributes to its "specificity score." It amplifies or suppresses the impact of variability in the final score calculation.Default parameters use "specificity_weight = 3".
This parameter refers to the normalized similarity between the "alternative cell type" and the "predicted cell type" in the returned results. (the default parameter is 0.8)
Logical indicating whether to calculate AUC values for predicted cell types. AUC measures how well the marker genes distinguish the cluster from others. When TRUE, adds an AUC column to the prediction results. (default: TRUE)
The logic indicates whether to draw an AUC curve for the predicted cell type. When TRUE, add an AUC_plot to result. (default: TRUE)
Logical value controlling AUC-based correction. (default = TRUE) When set to TRUE: 1.Computes AUC values for candidate cell types. (probability > threshold) 2.Selects the cell type with the highest AUC as the final predicted type. 3.Records the selected type's AUC value in the "AUC" column.
Color for lowest probability level in Heatmap visualization of probability matrix. (default = "navy")
Color for highest probability level Heatmap visualization of probability matrix. (default = "firebrick3")
Other Automated_Annotation_Workflow:
Celltype_Annotation()
,
Celltype_Verification()
if (FALSE) {
SlimR_anno_result <- Celltype_Calculate(seurat_obj = sce,
gene_list = Markers_list,
species = "Human",
cluster_col = "seurat_clusters",
assay = "RNA",
min_expression = 0.1,
specificity_weight = 3,
threshold = 0.8,
compute_AUC = TRUE,
plot_AUC = TRUE,
AUC_correction = TRUE,
colour_low = "navy",
colour_high = "firebrick3"
)
}
Run the code above in your browser using DataLab