View source: R/Celltype_Annotation_Features.R
Celltype_Annotation_Features | R Documentation |
This function dynamically selects the appropriate annotation method
based on the gene_list_type
parameter. It supports marker databases from
Cellmarker2, PanglaoDB, Seurat (via FindAllMarkers
), or Excel files.
Celltype_Annotation_Features(
seurat_obj,
gene_list,
gene_list_type = "Default",
species = NULL,
cluster_col = "seurat_clusters",
assay = "RNA",
save_path = NULL,
min_counts = 1,
metric_names = NULL,
colour_low = "white",
colour_high = "navy",
colour_low_mertic = "white",
colour_high_mertic = "navy",
...
)
seurat_obj |
A valid Seurat object with cluster annotations in |
gene_list |
A list of data frames containing marker genes and metrics.
Format depends on |
gene_list_type |
Type of marker database to use. Be one of:
|
species |
Species of the dataset: |
cluster_col |
Column name in |
assay |
Assay layer in the Seurat object (default: |
save_path |
Directory to save output PNGs. Must be explicitly specified. |
min_counts |
Minimum number of counts for Cellmarker2 annotations (default: |
metric_names |
Optional. Change the row name for the input mertics, not recommended unless necessary. (NULL is used as default parameter; used in "Seurat"/"Excel"). |
colour_low |
Color for lowest expression level. (default = "white") |
colour_high |
Color for highest expression level. (default = "black") |
colour_low_mertic |
Color for lowest mertic level. (default = "white") |
colour_high_mertic |
Color for highest mertic level. (default = "black") |
... |
Additional parameters passed to the specific annotation function. |
Saves cell type annotation PNGs in save_path
. Returns invisibly.
Other Semi_Automated_Annotation_Workflow:
Celltype_Annotation_Combined()
,
Celltype_Annotation_Heatmap()
## Not run:
# Example for Cellmarker2
Celltype_Annotation_Features(seurat_obj = sce,
gene_list = Markers_list_Cellmarker2,
species = "Human",
cluster_col = "seurat_clusters",
assay = "RNA",
save_path = file.path(tempdir(),"SlimR_Celltype_annotation_Cellmarker2"),
colour_low = "white",
colour_high = "navy",
colour_low_mertic = "white",
colour_high_mertic = "navy",
)
# Example for PanglaoDB
Celltype_Annotation_Features(seurat_obj = sce,
gene_list = Markers_list_panglaoDB,
species = "Human",
cluster_col = "seurat_clusters",
assay = "RNA",
save_path = file.path(tempdir(),"SlimR_Celltype_annotation_PanglaoDB")
colour_low = "white",
colour_high = "navy",
colour_low_mertic = "white",
colour_high_mertic = "navy",
)
# Example for Seurat marker list
Celltype_Annotation_Features(seurat_obj = sce,
gene_list = Markers_list_Seurat,
species = "Human",
cluster_col = "seurat_clusters",
assay = "RNA",
save_path = file.path(tempdir(),"SlimR_Celltype_annotation_Seurat")
colour_low = "white",
colour_high = "navy",
colour_low_mertic = "white",
colour_high_mertic = "navy",
)
# Example for Excel marker list
Celltype_Annotation_Features(seurat_obj = sce,
gene_list = Markers_list_Excel,
species = "Human",
cluster_col = "seurat_clusters",
assay = "RNA",
save_path = file.path(tempdir(),"SlimR_Celltype_annotation_Excel")
colour_low = "white",
colour_high = "navy",
colour_low_mertic = "white",
colour_high_mertic = "navy",
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.