shinyMsQuality: Shiny application to visualize quality metrics

View source: R/function_visualizations.R

shinyMsQualityR Documentation

Shiny application to visualize quality metrics

Description

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'

Usage

shinyMsQuality(qc)

Arguments

qc

'matrix', contains the calculated quality metrics, the columns contain the metrics and the rows the samples

Details

The plots within the shiny application can be saved by clicking on the download button.

Value

'shiny'

Author(s)

Thomas Naake, thomasnaake@googlemail.com

Examples

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)


tnaake/MsQuality documentation built on Dec. 1, 2022, 10:01 p.m.