addGeneSet | R Documentation |
Adds a molecular signature to the SPATA2
object.
addGeneSet(object, genes, name, class = "UD", overwrite = FALSE, check = TRUE)
addMetaboliteSet(
object,
metabolites,
name,
class = "UD",
overwrite = FALSE,
check = TRUE
)
addProteinSet(
object,
proteins,
name,
class = "UD",
overwrite = FALSE,
check = TRUE
)
addSignature(
object,
molecules,
name,
class = "UD",
assay_name = activeAssay(object),
overwrite = FALSE,
check = TRUE
)
object |
An object of class |
name |
Character value. The actual name of the signature. |
class |
Character value. The class (heritage) of the signature. Must not contain a _. Defaults to 'UD', short for user defined. |
overwrite |
Logical value. Must be |
check |
Logical value. If |
molecules , genes , proteins , metabolites |
Character vector. The molecules the signature consists of. |
assay_name |
Only relevant if the |
These functions allow to add molecular signatures to the provided object.
addSignature()
: Adds a signature to the assay specified in assay_name
.
addGeneSet()
: Adds a signature to the assay with @modality = 'gene' (assay_name = 'gene'
).
addMetaboliteSet()
: Adds a signature to the assay with @modality = 'metabolite' (assay_name = 'metabolite'
).
addProteinSet()
: Adds a signature to the assay with @modality = 'protein' (assay_name = 'protein'
).
The updated input object, containing the added, removed or computed results.
library(SPATA2)
data("example_data")
object <- example_data$object_UKF269T_diet
# example genes of an hypothetical gene signature (gene set)
genes <-
c('CYFIP1', 'SLC16A3', 'AKAP5', 'ADCY8', 'CALB2', 'GRIN1', 'NLGN4X', 'NLGN1',
'ITGA3', 'NLGN4Y', 'ELFN1', 'BSN', 'CNTN6', 'PDE4B', 'DGKI', 'LRRTM2', 'LRRTM1',
'SRPX2', 'SHANK1', 'SLC17A7')
# both, opt1 and opt2, have the same effect (addSignature() just allows to specify the
# assay of interest, which is fixed to 'gene' for addGeneSet()).
# opt1
object <- addSignature(object, name = "EXCITATORY_SYNAPSE", class = "Custom", molecules = genes)
# opt2
# object <- addGeneSet(object, name = "EXCITATORY_SYNAPSE", class = "Custom", genes = genes)
gs <- "Custom_EXCITATORY_SYNAPSE"
# visualize signature expression
plotSurface(object, color_by = gs)
# extract genes of signature
getGenes(object, signatures = gs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.