affiXcanGReX {AffiXcan} | R Documentation

## Compute a GReX from variables and their coefficients for a set of genes

### Description

Compute a GReX from variables and their coefficients for a set of genes

### Usage

    affiXcanGReX(affiXcanTraining, pcs, BPPARAM = bpparam())

### Arguments

`affiXcanTraining` | The returning object from affiXcanTrain()
`pcs` | A list, which is the returning object from affiXcanPcs()
`BPPARAM` | A BiocParallelParam object. Default is bpparam(). For details on BiocParallelParam virtual base class see browseVignettes("BiocParallel")

### Value

A SummarizedExperiment object containing the imputed GReX values

### 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")

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

    bs <- training$bs

    exprmatrix <- affiXcanGReX(affiXcanTraining=training, pcs=pcs)
    }

[Package AffiXcan version 1.2.0 Index]