affiXcanPcs {AffiXcan} | R Documentation

## Compute PCs in MultiAssayExperiment objects using eigenvectors given by user

### Description

Compute PCs in MultiAssayExperiment objects using eigenvectors given by user

### Usage

    affiXcanPcs(tbaPaths, affiXcanTraining, scale, BPPARAM = bpparam())

### Arguments

`tbaPaths` | A vector of strings, which are the paths to MultiAssayExperiment RDS files containing the tba values
`affiXcanTraining` | The returning object from affiXcanTrain()
`scale` | A logical; if scale=FALSE the TBA values will be only centered, not scaled before performing PCA
`BPPARAM` | A BiocParallelParam object. Default is bpparam(). For details on BiocParallelParam virtual base class see browseVignettes("BiocParallel")

### Value

A list of matrices containing the principal components values of TBA for each region; each object of the list is named after the MultiAssayExperiment object from which it derives

### Examples

    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)

    testingTbaPaths <- system.file("extdata","testing.tba.toydata.rds",
    package="AffiXcan")

    regionsCount <- overlookRegions(testingTbaPaths)

    pcs <- affiXcanPcs(tbaPaths=testingTbaPaths, affiXcanTraining=training,
    scale=TRUE)
    }

[Package AffiXcan version 1.2.0 Index]