View source: R/SCP-feature_annotation.R
AnnotateFeatures | R Documentation |
AnnotateFeatures Annotate features in a Seurat object with additional metadata from databases or a GTF file.
AnnotateFeatures(
srt,
species = "Homo_sapiens",
IDtype = c("symbol", "ensembl_id", "entrez_id"),
db = NULL,
db_update = FALSE,
db_version = "latest",
convert_species = TRUE,
Ensembl_version = 103,
mirror = NULL,
gtf = NULL,
merge_gtf_by = "gene_name",
columns = c("seqname", "feature", "start", "end", "strand", "gene_id", "gene_name",
"gene_type"),
assays = "RNA",
overwrite = FALSE
)
srt |
Seurat object to be annotated. |
species |
Name of the species to be used for annotation. Default is "Homo_sapiens". |
IDtype |
Type of identifier to use for annotation. Default is "symbol" with options "symbol", "ensembl_id", and "entrez_id". |
db |
Vector of database names to be used for annotation. Default is NULL. |
db_update |
Logical value indicating whether to update the database. Default is FALSE. |
db_version |
Version of the database to use. Default is "latest". |
convert_species |
A logical value indicating whether to use a species-converted database when the annotation is missing for the specified species. The default value is TRUE. |
Ensembl_version |
Version of the Ensembl database to use. Default is 103. |
mirror |
URL of the mirror to use for Ensembl database. Default is NULL. |
gtf |
Path to the GTF file to be used for annotation. Default is NULL. |
merge_gtf_by |
Column name to merge the GTF file by. Default is "gene_name". |
columns |
Vector of column names to be used from the GTF file. Default is "seqname", "feature", "start", "end", "strand", "gene_id", "gene_name", "gene_type". |
assays |
Character vector of assay names to be annotated. Default is "RNA". |
overwrite |
Logical value indicating whether to overwrite existing metadata. Default is FALSE. |
PrepareDB
ListDB
data("pancreas_sub")
pancreas_sub <- AnnotateFeatures(pancreas_sub,
species = "Mus_musculus", IDtype = "symbol",
db = c("Chromosome", "GeneType", "Enzyme", "TF", "CSPA", "VerSeDa")
)
head(pancreas_sub[["RNA"]]@meta.features)
## Annotate features using a GTF file
# pancreas_sub <- AnnotateFeatures(pancreas_sub, gtf = "/data/reference/CellRanger/refdata-gex-mm10-2020-A/genes/genes.gtf")
# head(pancreas_sub[["RNA"]]@meta.features)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.