Miscellaneous SCE {SingleCellExperiment} | R Documentation |
Various methods for the SingleCellExperiment class.
## S4 method for signature 'SingleCellExperiment' show(object) ## S4 method for signature 'SingleCellExperiment' objectVersion(x) ## S4 method for signature 'SingleCellExperiment' colData(x, internal=FALSE) ## S4 method for signature 'SingleCellExperiment' rowData(x, internal=FALSE)
x, object |
A SingleCellExperiment object. |
internal |
Whether the information contained in the internal slots should be returned. |
The show
method will print out information about the data contained in object
.
This describes the stored assays and row/column metadata, as done in show,SummarizedExperiment-method
.
The names of the reducedDims
slot and the names of the spike-ins (see spikeNames
) are also reported.
The objectVersion
method will return the version of the package with which x
was constructed.
This is useful for checking if the object is up to date relative to the latest versions of the package.
It may sometimes be useful to return both the visible and the internal colData
in a single DataFrame (see SingleCellExperiment-class
).
This can be achieved by using colData(x, internal=TRUE)
, which will return the stored colData
along with the int_colData
(currently the sizeFactors
).
Similarly, rowData(x, internal=TRUE)
will return the stored rowData
along with the int_rowData
(currently the columns corresponding to isSpike
).
Warnings will be raised in the unlikely event of any name clashes.
For show
, a message is printed to screen describing the data stored in object
.
For objectVersion
, an object of class package_version
is returned.
colData
and rowData
return a DataFrame
.
example(SingleCellExperiment, echo=FALSE) # Using the class example show(sce) objectVersion(sce) sizeFactors(sce) <- runif(ncol(sce)) isSpike(sce, "ERCC") <- rbinom(nrow(sce), 1, 0.2)==1 rowData(sce, internal=TRUE) colData(sce, internal=TRUE)