print(params)
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE, 
                      fig.path = params$output_figure, dev = "svg")
library(dplyr)
library(stringr)
library(MassExpression)
library(plotly)

CompleteIntensityExperiment <- params$listInt$CompleteIntensityExperiment
IntensityExperiment <- params$listInt$IntensityExperiment
design <- colData(IntensityExperiment)

comparisonExperiments <- 
    listComparisonExperiments(CompleteIntensityExperiment)
normalised <- FALSE
if(metadata(CompleteIntensityExperiment)$NormalisationAppliedToAssay != "None"){
  normalised <- TRUE
}

if(normalised){
  # Plot RLE of log2 raw intensity as well as RLE of normalised 
  plot_rle_boxplot(IntensityExperiment, CompleteIntensityExperiment, 
                      includeImputed = FALSE, 
                      plotRawRLE = FALSE,
                      title = "RLE of normalised log2(intensties)",
                      format = "html")

} else {
  text <- "No normalisation was applied to the data, therefore no difference is expected with the original log2(intensities) distribution."
}

r if(!normalised) text



MassDynamics/MassExpression documentation built on May 7, 2023, 11:29 a.m.