Description Usage Arguments Value Examples
Compute a matrix product between variables and eigenvectors
1 | computePcs(region, tbaMatrix, scale, pca)
|
region |
A string, which is the name of the object in the list MultiAssayExperiment::experiments(tbaMatrix) that contains the TBA values of the genomic region of interest (see the param tbaMatrix) |
tbaMatrix |
A MultiAssayExperiment object containing the TBA values |
scale |
A logical; if scale=FALSE the TBA values will be only centered, not scaled before performing PCA |
pca |
The returningObject$pca from affiXcanTrain() |
A data.frame containing the principal components values of the TBA in a certain genomic region, as the result of the matrix product between the TBA values and the eigenvectors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | if (interactive()) {
trainingTbaPaths <- system.file("extdata","training.tba.toydata.rds",
package="AffiXcan")
data(exprMatrix)
data(regionAssoc)
data(trainingCovariates)
assay <- "values"
training <- affiXcanTrain(exprMatrix=exprMatrix, assay=assay,
tbaPaths=trainingTbaPaths, regionAssoc=regionAssoc, cov=trainingCovariates,
varExplained=80, scale=TRUE)
region <- "ENSG00000256377.1"
tbaMatrixMAE <- readRDS(system.file("extdata","training.tba.toydata.rds",
package="AffiXcan"))
pca <- training$pca
pcs <- computePcs(region=region, tbaMatrix=tbaMatrixMAE, scale=TRUE, pca=pca)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.