
Create a singular multiomics assay by merging data from multiple assays.
Source:R/MultiOmicAnalysis.R
CreateMergedModalityAssay.RdCombines the scale.data slots from multiple assays in a SpaMTP Seurat object into a single new assay.
Useful for integrating multiple modalities (e.g. transcriptomics, proteomics, metabolomics) that have already been scaled.
Usage
CreateMergedModalityAssay(
SpaMTP,
assays.to.merge,
new.assay = "merged",
return.original = TRUE,
verbose = FALSE
)Arguments
- SpaMTP
A SpaMTP Seurat object that contains atleast two assays to be merged.
- assays.to.merge
A character vector specifying the names of assays whose
scale.dataslots should be merged. At least two assay names must be provided and both must contain thescale.dataslot, for example: assays.to.merge = c("SPM", "SPT").- new.assay
A character string specifying the name of the new assay to be created (default = "merged").
- return.original
Boolean value defining if the returned SpaMTP Seurat object will contain the original individual assays. If the data size is large it is recommended to set to
False(default = TRUE).- verbose
Boolean indicating whether to show the message. If TRUE the message will be show, else the message will be suppressed (default = TRUE).
Details
This function assumes that each specified assay has been processed with Seurat::ScaleData() (or an alternative scaling method), and that their scale.data slots contain numeric matrices. The merged assay will use the row-bound scale.data matrices as the counts, data, and scale.data slots.