run_pipeline | R Documentation |
This function is an efficient wrapper that fits the needed gamma regressions,
performs multiple imputation and testing with limma (see limmaUsersGuide
).
It is an efficient wrapper that generates need inputs for imputation and
running run_limma_and_lfc
with the possibility of using
multidplyr-package
to paralellize the computation.
It also calls produces the mean-variance trends if plot_trend
is TRUE
.
run_pipeline( data, design, contrast_matrix, imputations, workers = 1, id_col = "id", .robust = TRUE, plot_trend = FALSE )
data |
The data to run the pipeline on, missing values should have NA values. |
design |
A design matrix as produced by |
contrast_matrix |
A contrast matrix of comparisons to perfrom see
|
imputations |
Number of imputations to perfrome. |
workers |
Number of workers (processes) to run the pipeline with.
Any value >1 will run the pipeline with parallel computing using the
|
id_col |
A character for the name of the column containing the name of the features in data (e.g., peptides, proteins, etc.). |
plot_trend |
Should the mean-variance trend with the gamma regression be plotted? |
A tibble with each imputation as a row. The first column contains the
imputation number, the second contains the imputed data, and the last
column contains the results produced by run_limma_and_lfc
.
# 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.