The function 'shinyMsQuality' function starts a shiny application to visualize the quality metrics interactively. It allows to display all metrics contained in 'qc'.
The function accepts the output of 'calculateMetrics' or 'calculateMetricsFromSpectra'
'matrix', contains the calculated quality metrics, the columns contain the metrics and the rows the samples
The plots within the shiny application can be saved by clicking on the download button.
Thomas Naake, firstname.lastname@example.org
library(msdata) ## define file names containing spectra data for the samples and ## add them, along with other arbitrary files to the experiment fls <- dir(system.file("sciex", package = "msdata"), full.names = TRUE) library(Spectra) ## import the data and add it to the mse object sps <- Spectra(fls, backend = MsBackendMzR()) ## define the quality metrics to be calculated metrics <- c("areaUnderTic", "rtDuration", "msSignal10xChange") ## calculate the metrics ## additional parameters passed to the quality metrics functions ## (msLevel is an argument of areaUnderTic and msSignal10xChange, ## relativeTo is an argument of msSignal10xChange) qc <- calculateMetricsFromSpectra(spectra = sps, metrics = metrics, msLevel = 1, relativeTo = "Q1", change = "jump") rownames(qc) <- c("Sample 1", "Sample 2") if (interactive()) shinyMsQuality(qc = qc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.