addPlottingFactor | R Documentation |
SpatialOverlay
objectAdd plotting factor to SpatialOverlay
object
addPlottingFactor(overlay, annots, plottingFactor, ...)
## S4 method for signature 'NanoStringGeoMxSet'
addPlottingFactor(overlay, annots, plottingFactor, countMatrix = "exprs")
## S4 method for signature 'matrix'
addPlottingFactor(overlay, annots, plottingFactor)
## S4 method for signature 'tbl_df'
addPlottingFactor(overlay, annots, plottingFactor)
## S4 method for signature 'tbl'
addPlottingFactor(overlay, annots, plottingFactor)
## S4 method for signature 'data.frame'
addPlottingFactor(overlay, annots, plottingFactor)
## S4 method for signature 'character'
addPlottingFactor(overlay, annots, plottingFactor)
## S4 method for signature 'numeric'
addPlottingFactor(overlay, annots, plottingFactor)
## S4 method for signature 'factor'
addPlottingFactor(overlay, annots, plottingFactor)
overlay |
|
annots |
factor vector with the plottingFactor. if names match sample names in overlay vector will be matched on those, otherwise assumed in the correct order |
plottingFactor |
name of the new plotting factor |
... |
if using |
countMatrix |
name of count matrix to pull counts from |
SpatialOverlay
object with new plotting factor
muBrain <- readRDS(unzip(system.file("extdata", "muBrainSubset_SpatialOverlay.zip",
package = "SpatialOmicsOverlay")))
muBrainLW <- system.file("extdata", "muBrain_LabWorksheet.txt",
package = "SpatialOmicsOverlay")
muBrainLW <- readLabWorksheet(muBrainLW, slideName = "D5761 (3)")
muBrain <- addPlottingFactor(overlay = muBrain,
annots = muBrainLW,
plottingFactor = "segment")
muBrainGxT <- readRDS(unzip(system.file("extdata", "muBrain_GxT.zip",
package = "SpatialOmicsOverlay")))
muBrain <- addPlottingFactor(overlay = muBrain,
annots = muBrainGxT,
plottingFactor = "Calm1",
countMatrix = "exprs")
muBrain <- addPlottingFactor(overlay = muBrain,
annots = seq_len(length(sampNames(muBrain))),
plottingFactor = "ROINum")
head(plotFactors(muBrain))
muBrain <- readRDS(unzip(system.file("extdata", "muBrainSubset_SpatialOverlay.zip",
package = "SpatialOmicsOverlay")))
muBrain <- addPlottingFactor(overlay = muBrain,
annots = as.factor(seq_len(length(sampNames(muBrain)))),
plottingFactor = "ROINum")
head(plotFactors(muBrain))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.