rnb.execute.sva: rnb.execute.sva

Description Usage Arguments Value Author(s) Examples

View source: R/sva.R

Description

Conduct Surrogate Variable Analysis (SVA) on the beta values of an RnBSet for given target variables

Usage

1
2
3
4
5
6
7
rnb.execute.sva(
  rnb.set,
  cmp.cols = rnb.getOption("inference.targets.sva"),
  columns.adj = rnb.getOption("covariate.adjustment.columns"),
  assoc = TRUE,
  numSVmethod = rnb.getOption("inference.sva.num.method")
)

Arguments

rnb.set

The RnBSet object on which the SVA should be conducted

cmp.cols

a vector of sample annotation column names which will be the targets of the SVA.

columns.adj

Column names in the table of phenotypic information to be used for confounder adjustment.

assoc

a flag indicating whether association information with principal components and other sample annotation should be returned

numSVmethod

method to estimate the number of surrogate variables. Passed to sva.

Value

An object of class SvaResult: basically a list containing the following elements:

num.components

a vector storing the number of detected SVs for each target variable

sva.performed

a vector storing whether SVA was performed on a target variable and whether more than 0 SVs were found

targets

a vector storing the names of the target variables

components

a list storing for each target variable a matrox containing the sample-wise SVs as rows

assoc

a special object containing association information of SVs with principal components and sample annotations typically only used rnb.section.sva.

Author(s)

Fabian Mueller

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(RnBeads.hg19)
data(small.example.object)
logger.start(fname=NA)
sva.obj <- rnb.execute.sva(rnb.set.example,c("Sample_Group","Treatment"),numSVmethod="be")
sva.obj$sva.performed
sva.obj$num.components
rnb.set.mod <- set.covariates.sva(rnb.set.example, sva.obj)
has.covariates.sva(rnb.set.example,"Sample_Group")
has.covariates.sva(rnb.set.mod,"Sample_Group")
has.covariates.sva(rnb.set.mod,"Treatment")

RnBeads documentation built on March 3, 2021, 2 a.m.