Contribution-class | R Documentation |
"Contribution"
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.
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), ...)
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. |
The plasma
function returns a newly constructed object of the
plasma
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).
contrib
:a matrix of the original variables in dataset N
as rows and the PLS components M
as columns.
datasets
:a character vector that stores the names of the datasets that were specified for the function.
summary
:outputs summary statistics for the contributions of dataset N
to components from all datasets in the case of getAllWeights
or dataset M
in the case of getCompositeWeights
.
image
:outputs a heatmap of the transposed contrib
matrix.
heat
:outputs a clustered heatmap of the contrib
matrix.
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.