computeExpr {AffiXcan} | R Documentation

## Compute the imputed GReX for a certain gene on a set of individuals

### Description

Compute the imputed GReX for a certain gene on a set of individuals

### Usage

    computeExpr(bs, pcs)

### Arguments

`bs` | A list containing three objects: coefficients: An object containing the coefficients of the principal components used in the model, completely similar to the "coefficients" object from the results of lm() p.val: The uncorrected anova pvalue of the model r.sq: The coefficient of determination between the real total expression values and the imputed GReX, retrived from summary(model)$r.squared
`pcs` | A list, which is the returning object of affiXcanPcs()

### Value

A vector of 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)

    region <- "ENSG00000256377.1"
    bs <- training$bs[[region]]

    exprmatrix <- computeExpr(bs=bs, pcs=pcs)
    }

[Package AffiXcan version 1.8.0 Index]