sva_network: A function to adjust gene expression data before network...

Description Usage Arguments Value Examples

View source: R/sva_network.R

Description

This function corrects a gene expression matrix prior to network inference by returning the residuals after regressing out the top principal components. The number of principal components to remove can be determined using a permutation-based approach using the "num.sv" function with method = "be"

Usage

1
sva_network(dat, n.pc)

Arguments

dat

The uncorrected normalized gene expression data matrix with samples in rows and genes in columns

n.pc

The number of principal components to remove

Value

dat.adjusted Cleaned gene expression data matrix with the top prinicpal components removed

Examples

1
2
3
4
5
6
7
8
9
library(bladderbatch)
data(bladderdata)
dat <- bladderEset[1:5000,]

edata = exprs(dat)
mod = matrix(1, nrow = dim(dat)[2], ncol = 1)

n.pc = num.sv(edata, mod, method="be")
dat.adjusted = sva_network(t(edata), n.pc)

sva documentation built on Nov. 8, 2020, 8:16 p.m.