getXIC: Plot and Extracted Ion Chromatogram

Description Usage Arguments Value Author(s)

View source: R/getXIC.R

Description

This function can be used to plot an Extracted Ion Chromatogram

Check Dataframe, if empty return an object and stop function call

Check numeric values if not NULL

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
getXIC(
  graphic_obj = ggplot2::ggplot(),
  mod,
  df_lib,
  chromatogram_file,
  chromatogram_data_points_list = NULL,
  Isoform_Target_Charge,
  in_osw = NULL,
  annotate_best_pkgrp = TRUE,
  transition_type = c("detecting"),
  uni_mod_list = NULL,
  max_Int = NULL,
  smooth_chromatogram = list(p = 4, n = 9),
  doFacetZoom = FALSE,
  FacetFcnCall = NULL,
  top_trans_mod_list = NULL,
  transition_selection_list = NULL,
  RT_pkgrps = NULL,
  show_manual_annotation = NULL,
  show_peak_info_tbl = F,
  plotIdentifying.Unique = NULL,
  plotIdentifying.Shared = NULL,
  plotIdentifying.Against = NULL,
  show_n_transitions = NULL,
  transition_dt = NULL,
  show_legend = T
)

Arguments

graphic_obj

A ggplot() graphics handle. Initialize with g <- ggplot() to create an empty ggplot handle

mod

A character vector for specific peptide/modified peptide to extract I.e. 'ANSSPTTNIDHLK'/'ANS(UniMod:21)SPTTNIDHLK(UniMod:259)'. The MODIFIED_SEQUENCE column is used

df_lib

A data.table containing spectral library information

chromatogram_file

A character vector of the absolute path and filename of the chromatogram file. (Must be .mzML or sqMass format)

chromatogram_data_points_list

(Optional) Pass a list containing chromatogram data.

in_osw

A character vector of the absolute path and filename of the OpenSwath Output file. (Must be .osw) @TODO maybe make this more robust for tsv files as well?

annotate_best_pkgrp

Annotate the ebst peak group

transition_type

A vector containing possible choices for dispalying one of the following transition group types. getXIC needs to be called for each option (Options: c('precursor', 'detecting', 'identifying') )

max_Int

A numeric value indicating the maximum intensity. This is used for FacetZooming the y-axis. (Default: NULL)

smooth_chromatogram

A list object containing the polynomial filter order (p), and the bandwidth (number of data-points to smooth over, n). (Default: list(p=4, n=9))

doFacetZoom

A logical value for calling Facet_Zoom function to zoom in the y axis based on the max_Int/4. (Default: FALSE)

FacetFcnCall

A personalized function call to Facet_Zoom. I.e. FacetFcnCall = facet_zoom(xlim = c(3950, 4050), ylim = c(0, 10000)). (Default: NULL)

top_trans_mod_list

A list containing a data.table/data.frame of the current peptide(mod peptide) with information for transition ids and top posterior error probabilities.

transition_selection_list

A list containing transitions to display for unique identifying. i.e. transition_selection_list <- list( y = c(3), b = c(8:10) )

RT_pkgrps

A numeric vector of the alternative peak group ranks to display. I.e. c(2, 4) (Default: NULL)

show_manual_annotation

a dataframe with leftWidth and rightWidth retention time boundary values of a manually annotated peak. Will draw a transparent blue shaded rectangle indicating manual annotation. I.e data.frame(leftWidth=300, rightWidth=330)

show_peak_info_tbl

A logical value. Show peak information table containing RT, rank, ms2-mscore, ipf_pep, ipf-mscore. (Default: FALSE)

plotIdentifying.Unique

A logical value. TRUE will plot unique identifying transitions. (Default: NULL)

plotIdentifying.Shared

A logical value. TRUE will plot shared identifying transitions. (Default: NULL)

plotIdentifying.Against

A logical value. TRUE will plot against identifying transitions. (Default: NULL)

show_n_transitions

A numeric value indicating the number of transitions to draw. (Default: NULL, default is 6 transitions)

transition_dt

A data.table containing TRANSITION_SCORE Information obtained from the OSW file using getTransitionScores_. (Default: NULL)

show_legend

A logical value. Display legend information for transition id, m/z and charge. (Default: TRUE)

unit_mod_list

A list of potential modifiable forms. (Default: NULL)

df

A data.frame/data.table/matrix object to check for number of rows

return_item
msg

error message to return

numeric_obj

Check if an numeric object is not NULL

signif.not

Return significant notation

Value

A list containing graphic_obj = the graphic handle for the ggplot filled with data and max_Int = the maximun intensity

if data.frame has 0 rows, return true, otherwise return false

If numeric object is not null, round numeric object to 4 digits

Author(s)

Justin Sing https://github.com/singjc


Roestlab/mstools documentation built on Jan. 19, 2020, 3:47 a.m.