plot_CalibratedMSErr: Plot bargraph of uncalibrated mass errors for each Raw file.

View source: R/fcn_plots.R

plot_CalibratedMSErrR Documentation

Plot bargraph of uncalibrated mass errors for each Raw file.

Description

Boxes are optionally colored to indicate that a MQ bug was detected or if PTXQC detected a too narrow search window.

Usage

plot_CalibratedMSErr(
  data,
  MQBug_raw_files,
  stats,
  y_lim,
  extra_limit = NA,
  title_sub = ""
)

Arguments

data

A data.frame with columns 'fc.raw.file', 'mass.error..ppm.'

MQBug_raw_files

List of Raw files with invalid calibration values

stats

A data.frame with columns 'fc.raw.file', 'outOfCal'

y_lim

Range of y-axis

extra_limit

Position where a v-line is plotted (for visual guidance)

title_sub

Subtitle

Value

GGplot object

Examples

  n = c(150, 1000, 1000, 1000)
  data = data.frame(fc.raw.file = repEach(letters[4:1], n),
                    mass.error..ppm. = c(rnorm(n[1], 1, 2.4),
                                         rnorm(n[2], 0.5, 0.5),
                                         rnorm(n[3], 0.1, 0.7),
                                         rnorm(n[4], 0.3, 0.8)))
  stats = data.frame(fc.raw.file = letters[4:1],
                     sd = c(2.4, 0.5, 0.7, 0.8),
                     outOfCal = c(TRUE, FALSE, FALSE, FALSE))           
  plot_CalibratedMSErr(data, MQBug_raw_files = letters[1], stats, y_lim = c(-20,20), 15, "subtitle")


PTXQC documentation built on Sept. 21, 2022, 9:10 a.m.