SPHMMethods | R Documentation |
SPHM
These are methods for getting or setting SPHM objects.
## S4 method for signature 'SPHM'
svg(x)
## S4 replacement method for signature 'SPHM'
svg(x) <- value
## S4 method for signature 'SPHM'
bulk(x)
## S4 replacement method for signature 'SPHM'
bulk(x) <- value
## S4 method for signature 'SPHM'
cell(x)
## S4 replacement method for signature 'SPHM'
cell(x) <- value
## S4 method for signature 'SPHM'
match(x)
## S4 replacement method for signature 'SPHM'
match(x) <- value
## S4 method for signature 'SPHM'
output(x)
## S4 replacement method for signature 'SPHM'
output(x) <- value
## S4 method for signature 'SPHM,ANY,ANY,ANY'
x[i]
## S4 replacement method for signature 'SPHM,ANY,ANY,ANY'
x[i] <- value
## S4 method for signature 'SPHM'
length(x)
## S4 method for signature 'SPHM'
name(x)
x |
An 'SPHM' object. |
value |
A value for replacement. |
i |
An integer specifying a slot of an |
An object of SVG
, SummarizedExperiment
, SingleCellExperiment
, data.frame
, numeric
, or list
.
In the following code snippets, x
is an SPHM object.
x[i]
, svg(x), bulk(x), cell(x), match(x), output(x)Subsetting a slot of x
.
Replacing a slot value in x
.
name(x)
All slot names in x
.
length(x)
Number of all slots in x
.
Jianhai Zhang jzhan067@ucr.edu
Dr. Thomas Girke thomas.girke@ucr.edu
SPHM
: creating SPHM
objects.
# Import an aSVG image.
svg.hum.pa <- system.file("extdata/shinyApp/data", 'homo_sapiens.brain.svg',
package="spatialHeatmap")
svg.hum <- read_svg(svg.hum.pa)
# aSVG features.
feature.hum <- attribute(svg.hum)[[1]]
set.seed(20)
unique(feature.hum$feature)[1:10]
# Testing vector.
my_vec <- setNames(sample(1:100, 4), c('substantia.nigra', 'putamen', 'prefrontal.cortex',
'notMapped')); my_vec
# An SPHM object for storing bulk data and aSVG.
dat.quick <- SPHM(svg=svg.hum, bulk=my_vec)
# Getters and setters for SPHM objects.
svg(dat.quick); svg(dat.quick) <- svg.hum
dat.quick['bulk']; dat.quick['bulk'] <- my_vec
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.