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

weitrix_calibrate(weitrix, dispersions)



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


A dispersion for each row.


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


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.


# 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)
#> [1] 1 1 1 1 1 1 1