plot_gamma_precision: Function for plotting the gamma regression used for...

View source: R/plot_gamma_regression.R

plot_gamma_precisionR Documentation

Function for plotting the gamma regression used for mean-variance normalization

Description

Generates a scatter plot with the gamma regressions of the mean-variance trends for the precision weights

Usage

plot_gamma_precision(data, design, id_col)

Arguments

data

The data to use for producing the plots.

design

A design matrix as produced by model.matrix.

id_col

A character for the name of the column containing the name of the features in data (e.g., peptides, proteins, etc.).

Value

a plot with the mean-variance trend used for the precision weights.

Examples

# Produce a design matrix
design <- model.matrix(~ 0 + factor(rep(1:2, each = 3)))
colnames(design) <- paste0("ng", c(50, 100))

# Normalize and log transform the data
yeast <- psrn(yeast, "identifier")

# Generate the plot
plot_gamma_precision(yeast, design, "identifier")

PhilipBerg/PaiR documentation built on March 18, 2022, noon