eDense() returns an assay of the Dense slot of a ScMaSigPro
object, genes by bins, as a dense matrix; eDense<- sets one.
Usage
eDense(object, i = "bulk.counts", ...)
eDense(object, i = "bulk.counts") <- value
# S4 method for class 'ScMaSigPro'
eDense(object, i = "bulk.counts", ...)
# S4 method for class 'ScMaSigPro,character'
eDense(object, i = "bulk.counts") <- value
# S4 method for class 'ScMaSigPro,missing'
eDense(object, i = "bulk.counts") <- valueArguments
- object
A ScMaSigPro object.
- i
The name of the assay. With the default,
"bulk.counts",eDense()returns the first assay when no assay has that name.- ...
Not used.
- value
A matrix, a
dgCMatrixor a data frame of numbers, with one row per gene and one column per bin of theDenseslot. Its row and column names, when present, must be the gene and bin names of the slot in the same order; missing names are filled in.
Details
eDense<- stores value as a dgCMatrix. It gives a message when it
creates a new assay and a warning when it replaces one.
See also
Other accessors:
cDense(),
cSparse(),
eSparse(),
pathAssign(),
predictors()
Examples
data("scmp.ob", package = "scMaSigPro")
bulk <- eDense(scmp.ob)
bulk[1:3, 1:4]
#> Path1_bin_1 Path1_bin_2 Path1_bin_3 Path1_bin_4
#> Gene1 16 24 11 31
#> Gene2 6335 7337 3375 9161
#> Gene3 201 245 105 216
# Add a second assay
eDense(scmp.ob, "logcounts") <- log1p(bulk)
#> Creating a new assay as 'logcounts'.
