ruvNorm: Remove unwanted variance (RUV)

Description Usage Arguments Value

View source: R/ruvNorm.R

Description

This function is a wrapper for RUVs from RUVSeq to remove unwanted variance using control genes. Additionally, if the number of factors to remove is unknown, the value of k is estimated using surrogate variable analysis. However, if the number of factors is known a priori, then k can be specified.

Usage

1
2
ruvNorm(x, mod, cIdx, k = "estimate", scIdx, round = TRUE, epsilon = 1,
  tolerance = 1e-08, isLog = FALSE, ...)

Arguments

x

A data matrix where loci are rows and samples are columns

mod

A model matrix of variables to fit the data

cIdx

A vector of loci/spike-ins in the data matrix to be used as negative controls (default = all loci)

k

The number of factors of unwanted variation to be estimated/removed from the data (default = estimate)

scIdx

A matrix of sample replicates to be used to estimate/remove unwanted variation

round

Measures are rounded to form pseudo-counts

epsilon

An offset to be added to avoid taking log of 0 (default = 1)

tolerance

Selection tolerance for singular values to be considered positive (default = 1e-8)

isLog

Whether the input matrix is already log-transformed (default = FALSE)

...

Other arguments to be passed to estK

Value

A list object of the samples-by-factors matrix of estimated unwanted variation and the normalized counts (removed unwanted variation)


biobenkj/ATACseeker documentation built on May 7, 2019, 8:36 a.m.