Learn R Programming

plasma (version 1.1.4)

Contribution-class: 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 Contribution
summary(object, ...)
# S4 method for Contribution
image(x, col = viridis(64), mai = c(1.82, 1.52, 0.32, 0.32), ...)
# S4 method for Contribution
heat(object, main = "Contributions", col = viridis(64),
                                           mai = c(1.52, 0.32, 0.82, 1.82), ...)

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).

Arguments

object

In the first four functions, an object of the plasma class. In the methods described here, an object of the Contributions class.

N

in the function getCompositeWeights, the name of the dataset being modeled.
in the function getTop, the number of significant components you want to print.

M

name of the dataset being modeled pairwise with dataset N in the getCompositeWeights function.

alpha

level of significance used in the pickSignificant function.

...

other graphical parameters.

x

an object of the Contributions class.

main

A character vector of length one; the main plot title.

col

A vector of color descriptors.

mai

A vector of four nonnegative numbers.

Slots

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.

Methods

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.

Author

Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu

Examples

Run this code
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)

Run the code above in your browser using DataLab