Description Usage Arguments Details Value Author(s) See Also Examples
The LoomExperiment family of classes is used as a bridge between Bioconductor's "Experiment" classes and the Linnarson Lab's http://linnarssonlab.org/loompy/index.html.
The family of LoomExperiment classes all inherit from the class LoomExperiment as well as their respectively named parent classes.
The LoomExperiment class inheirts from SummarizedExperiment
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Constructor
LoomExperiment(..., colGraphs = LoomGraphs(), rowGraphs = LoomGraphs())
RangedLoomExperiment(..., colGraphs = LoomGraphs(), rowGraphs = LoomGraphs())
SingleCellLoomExperiment(..., colGraphs = LoomGraphs(), rowGraphs = LoomGraphs())
## Accessors
## S4 method for signature 'LoomExperiment'
colGraphs(x, ...)
## S4 replacement method for signature 'LoomExperiment'
colGraphs(x, ...) <- value
## S4 method for signature 'LoomExperiment'
rowGraphs(x, ...)
## S4 replacement method for signature 'LoomExperiment'
rowGraphs(x, ...) <- value
## Subsetting
## S4 method for signature 'LoomExperiment'
x[i, j, ..., drop=TRUE]
## Binding
## S4 method for signature 'LoomExperiment'
rbind(..., deparse.level=1)
## S4 method for signature 'LoomExperiment'
cbind(..., deparse.level=1)
|
x |
A LoomExperiment object |
colGraphs,rowGraphs |
LoomGraphs to be placed in either the colGraphs or rowGraphs slot respectively |
value |
For |
... |
For constructors, |
i,j |
For subsetting, indices specifying elements to subset LoomGraph by. For dropHits, numeric indicating the node number |
drop |
For matrices and arrays. If 'TRUE' the result is coerced to the lowest posible dimesnion. This only woeks for extracting elements, not for the replacement. |
deparse.level |
See '?base::cbind' for a description of this argument. |
The LoomExperiment class is a virtual class meant to to act as an interface for other "_LoomExperiment"
classes.
It contains two slots:
colGraphs
:A LoomGraphs object containing col_graph
data as specified by the loom format.
rowGraphs
:A LoomGraphs object containing row_graph
data as specified by the loom format.
The intended use of this class is as an interface that allows various slots and operations necessary for subsequent "_LoomExperiment"
classes to be defined.
The colGraphs
and rowGraphs
slot stores a LoomGraphs
object that stores a graph of edges between vertices and possibly associated weights. These slots may be NULL
.
An object of class LoomExperiment
Daniel Van Twisk
SummarizedExperiment
,
RangedSummarizedExperiment
,
SingleCellExperiment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Construction
counts <- matrix(rpois(100, lambda = 10), ncol=10, nrow=10)
sce <- SingleCellExperiment(assays = list(counts = counts))
scle <- SingleCellLoomExperiment(sce)
# OR
scle <- SingleCellLoomExperiment(assays = list(counts = counts))
# OR
scle <- as(sce, "SingleCellLoomExperiment")
scle
## Get and replace rowGraphs and colGraphs
colGraphs(scle)
rowGraphs(scle)
a <- c(1, 2, 3)
b <- c(3, 2, 1)
w <- c(100, 10, 1)
lg <- LoomGraph(a, b, weight=w)
lgs <- LoomGraphs(lg, lg)
names(lgs) <- c('lg1', 'lg2')
lgs
colGraphs(scle) <- lgs
rowGraphs(scle) <- lgs
colGraphs(scle)
rowGraphs(scle)
colGraphs(scle)[[1]]
rowGraphs(scle)[[1]]
## Subsetting
scle2 <- scle[c(1, 3), 1:2]
colGraphs(scle2)[[1]]
rowGraphs(scle2)[[1]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.