Universal Imports + High Quality QC + Differential Expression Analysis = Awesomeness.
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE, collapse = TRUE, comment = "#>", fig.width = 6, fig.height = 6)
library(devtools) library(tibble) library(plotly) library(stringr)
devtools::install_github("MassDynamics/MassExpression")
library(MassExpression) utils::packageVersion("MassExpression")
data(package="MassExpression")
intensities <- mq_lfq_data$intensities design <- mq_lfq_data$design parameters <- mq_lfq_data$parameters normalisation_method <- parameters[parameters[,1] == "UseNormalisationMethod",2] species <- parameters[parameters[,1] == "Species",2] labellingMethod <- parameters[parameters[,1] == "LabellingMethod",2] results <- runGenericDiscovery(experimentDesign = design, proteinIntensities = intensities, normalisationMethod = normalisation_method, species = species, labellingMethod = labellingMethod) IntensityExperiment <- results$IntensityExperiment CompleteIntensityExperiment <- results$CompleteIntensityExperiment longIntensityDT <- results$longIntensityDT design <- colData(CompleteIntensityExperiment)
results
is a list containing two SummarizedExperiment
objects:
IntensityExperiment
: contains the raw data (including missing values)
CompleteIntensityExperiment
: contains the imputed data and summary statistics about the number of replicates and imputed proteins in each group of the conditions of interest.
tools::buildVignettes(dir = ".", tangle=TRUE)
output_folder <- "path/to/output/folder" saveOutput(IntensityExperiment = IntensityExperiment, CompleteIntensityExperiment = CompleteIntensityExperiment, longIntensityDT = longIntensityDT, outputFolder = output_folder)
# Render and save QC report qc_report <- system.file("rmd","QC_report.Rmd", package = "MassExpression") rmarkdown::render(qc_report, params = list(listInt = results, experiment = "Mass Dynamics QC report", output_figure = file.path(output_folder, "figure_html/"), format = "html"), output_file = file.path(output_folder, "QC_Report.html"), output_format=rmarkdown::html_document( self_contained=FALSE, lib_dir=file.path(output_folder,"qc_report_files"), code_folding= "hide", theme="united", toc = TRUE, toc_float = TRUE, fig_caption= TRUE, df_print="paged")) # Render PDF rmarkdown::render(qc_report, params = list(listInt = results, experiment = "Mass Dynamics QC report", output_figure = file.path(output_folder_pdf, "figure_pdf/"), format = "pdf"), output_file = file.path(output_folder_pdf, "QC_Report.pdf"), output_format=rmarkdown::pdf_document( toc = TRUE, fig_caption= TRUE))
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.