weitrix_calibrate: Adjust weights row-wise based on given row dispersions

Description Usage Arguments Details Value Examples

View source: R/calibrate.R

Description

Based on estimated row dispersions, adjust weights in each row.

Usage

1
weitrix_calibrate(weitrix, dispersions)

Arguments

weitrix

A weitrix object, or an object that can be converted to a weitrix with as_weitrix.

dispersions

A dispersion for each row.

Details

For large numbers of samples this can be based directly on weitrix_dispersions. For small numbers of samples, when using limma, it should be based on a trend-line fitted to known co-variates of the dispersions. This can be done using weitrix_calibrate_trend.

Value

A SummarizedExperiment object with metadata fields marking it as a weitrix.

Examples

1
2
3
4
5
6
# Adjust weights so dispersion for each row is exactly 1. This is dubious 
# for a small dataset, but would be fine for a dataset with many columns.
comp <- weitrix_components(simwei, p=1, verbose=FALSE)
disp <- weitrix_dispersions(simwei, comp)
cal <- weitrix_calibrate(simwei, disp)
weitrix_dispersions(cal, comp)

weitrix documentation built on Nov. 8, 2020, 8:10 p.m.