get_precision_weights: Get precision weights from the copy number-variance...

Description Usage Arguments Details Value References Examples

View source: R/fit.R

Description

Estimates the variability of the supplied log-ratios across samples as a function of copy number (DNA count levels).

Usage

1
get_precision_weights(logr, design, log_dna, span = 0.4, plot = TRUE, ...)

Arguments

logr

Matrix of outcome measures: log2 ratio of RNA counts to DNA counts.

design

Design matrix specifying comparisons of interest.

log_dna

Matrix of log2 aggregated DNA counts of the same dimension as logr.

span

The smoothing span for lowess in estimating the copy number-variance relationship. Default: 0.4.

plot

If TRUE, plot the copy number-variance relationship.

...

Further arguments to be passed to lmFit for obtaining residual standard deviations used in estimating the copy number-variance relationship.

Details

Residual standard deviations are computed using the supplied outcomes and design matrix. The square root of the the residual standard deviations are modeled as a function of the average log2 aggregated DNA counts to estimate the copy number-variance relationship.

Value

A matrix of precision weights of the same dimension as logr and log_dna.

References

Law, Charity W., Yunshun Chen, Wei Shi, and Gordon K. Smyth. Voom: Precision Weights Unlock Linear Model Analysis Tools for RNA-Seq Read Counts. Genome Biology 2014, 15:R29. doi: 10.1186/gb-2014-15-2-r29.

Examples

1
2
3
4
5
6
7
data(mpraSetAggExample)
design <- data.frame(intcpt = 1,
                     episomal = grepl("MT", colnames(mpraSetAggExample)))
logr <- compute_logratio(mpraSetAggExample, aggregate = "none")
log_dna <- log2(getDNA(mpraSetAggExample, aggregate = FALSE) + 1)
w <- get_precision_weights(logr = logr, design = design,
                           log_dna = log_dna, plot = FALSE)

mpra documentation built on Feb. 28, 2021, 2:01 a.m.