Contribution-class {plasma} | R Documentation |
Class "Contribution"
Description
The Contribution
object class contains the weight matrix between variables and the PLS components. The values in the weight matrix are a numeric representation of how much a variable from the omics datasets contributed to defining the final PLS components.
Usage
getCompositeWeights(object, N, M)
getAllWeights(object, N)
getFinalWeights(object)
getTop(object, N = 1)
pickSignificant(object, alpha)
## S4 method for signature 'Contribution'
summary(object, ...)
## S4 method for signature 'Contribution'
image(x, col = viridis(64), mai = c(1.82, 1.52, 0.32, 0.32), ...)
## S4 method for signature 'Contribution'
heat(object, main = "Contributions", col = viridis(64),
mai = c(1.52, 0.32, 0.82, 1.82), ...)
Arguments
object |
In the first four functions, an object of the
|
N |
in the function |
M |
name of the dataset being modeled pairwise with dataset |
alpha |
level of significance used in the |
... |
other graphical parameters. |
x |
an object of the |
main |
A character vector of length one; the main plot title. |
col |
A vector of color descriptors. |
mai |
A vector of four nonnegative numbers. |
Value
The plasma
function returns a newly constructed object of the
plasma
class.
Objects from the Class
Objects are defined using the getAllWeights
, getCompositeWeights
, getTop
, or pickSignificant
functions. In the simplest scenario, one would enter an object of class plasma
and any specific parameters associated with the function (see arguments section for more info).
Slots
contrib
:a matrix of the original variables in dataset
N
as rows and the PLS componentsM
as columns.datasets
:a character vector that stores the names of the datasets that were specified for the function.
Methods
summary
:outputs summary statistics for the contributions of dataset
N
to components from all datasets in the case ofgetAllWeights
or datasetM
in the case ofgetCompositeWeights
.image
:outputs a heatmap of the transposed
contrib
matrix.heat
:outputs a clustered heatmap of the
contrib
matrix.
Author(s)
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
Examples
fls <- try(loadESCAdata())
if (inherits(fls, "try-error")) {
stop("Unable to load data from remote server.")
}
# restrict data set size
MO <- with(plasmaEnv, prepareMultiOmics(
assemble[c("ClinicalBin", "ClinicalCont", "RPPA")], Outcome))
splitVec <- with(plasmaEnv, rbinom(nrow(Outcome), 1, 0.6))
trainD <- MO[, splitVec == 1]
testD <- MO[, splitVec == 0]
firstPass <- fitCoxModels(trainD, "Days", "vital_status", "dead")
pl <- plasma(object = trainD, multi = firstPass)
getCompositeWeights(object = pl, N = "ClinicalBin", M = "RPPA")
cbin <- getAllWeights(object = pl, N = "ClinicalBin")
summary(cbin)
image(cbin)
heat(cbin, cexCol = 0.5)
cbin01 <- pickSignificant(object = cbin, alpha = 0.01)
image(cbin01)
heat(cbin01, cexCol = 0.5)
getTop(object = cbin01, N = 3)