plot_ma: Generate a MA-plot of the analysis.

View source: R/plot_MA.R

plot_maR Documentation

Generate a MA-plot of the analysis.

Description

Generate a MA-plot of the analysis.

Usage

plot_ma(hits, data = NULL, id_col = NULL, alpha = NULL, abs_lfc = NULL)

Arguments

hits

a tibble produced by extract_results

data

the data.frame used in the analysis. This should always be NULL if hits was produced by extract_results.

id_col

a character for the name of the column containing the name of the features in data (e.g., peptides, proteins, etc.). This should always be NULL if hits was produced by extract_results.

alpha

The alpha cut-off for considering a p-value significant. This should always be NULL if hits was produced by extract_results.

abs_lfc

If a LFC threshold should also be used in the decision. This should always be NULL if hits was produced by extract_results.

Value

a ggplot2 of the distribution of the hits.

Examples

# Generate a design matrix for the data
design <- model.matrix(~ 0 + factor(rep(1:2, each = 3)))

# Set correct colnames, this is important for fit_gamma_*
colnames(design) <- paste0("ng", c(50, 100))

# Generate the contrast matrix
contrast <- limma::makeContrasts(
  contrasts = "ng100-ng50",
  levels = design
)

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

results <- run_pipeline(yeast, design, contrast, 1000, 5, "identifier", TRUE)
imputation_summary <- extract_results(yeast, results, .05, 1, "fdr", "identifier")
plot_ma(imputation_summary)

## End(Not run)

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