plotgroup: Barplot of m/z isotope (and optional adduct) relations within...

View source: R/plotgroup.R

plotgroupR Documentation

Barplot of m/z isotope (and optional adduct) relations within an isotope pattern group.

Description

Plots the m/z isotope relations among peaks part of an isotope pattern group detected by pattern.search. Optionally, adduct relations from adduct.search can be depicted, too.

Usage

plotgroup(pattern, adduct = FALSE, groupID, massrange = 10, allmass = TRUE)

Arguments

pattern

List of type pattern, i.e. value generated by pattern.search.

adduct

List of type pattern, i.e. value generated by pattern.search. If not used, set to FALSE.

groupID

Isotope pattern group ID of the isotope pattern group to be plotted. Group ID as generated by pattern.search.

massrange

m/z range of other peaks in the HRMS peaks in the data set below and above the smallest and largest m/z of the isotope pattern group to be plotted, respectively.

allmass

Prints only the peaks in the isotope pattern (allmass=FALSE) or also those included via argument massrange (allmass=TRUE).

Details

The upper pannel barplot shows all peaks included by massrange. The lower one only those of the isotope pattern group specified by argument groupID. Below that, shown by lines, come the isotope relations among peaks. At the bottom, relations of individual peaks in the isotope pattern group to adduct groups are highlighted, as far as available. Herein, this adduct refers to the adduct assigned to the isotope pattern group, whereas further adducts to those of other peaks relatable via adduct groups. Peak number refers to the line number of the peak dataframe printed (see value).

Value

Dataframe with peaks, see argument allmass.

Author(s)

Martin Loos

See Also

pattern.search adduct.search

Examples


#############################################################
data(peaklist);
data(adducts);
data(isotopes);
# run isotope grouping ######################################
iso<-make.isos(isotopes,
	use_isotopes=c("13C","15N","34S","37Cl","81Br","41K","13C","15N","34S","37Cl","81Br","41K"),
	use_charges=c(1,1,1,1,1,1,2,2,2,2,2,2))
	
pattern<-pattern.search(
  peaklist,
  iso,
  cutint=10000,
  rttol=c(-0.05,0.05),
  mztol=2,
  mzfrac=0.1,
  ppm=TRUE,
  inttol=0.2,
  rules=c(TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE),
  deter=FALSE,
  entry=50
);
plotgroup(pattern,adduct=FALSE,groupID=3,massrange=10,allmass=FALSE)
# run adduct grouping #######################################
adduct<-adduct.search(
  peaklist,
  adducts,
  rttol=0.05,
  mztol=3,
  ppm=TRUE,
  use_adducts=c("M+K","M+H","M+Na","M+NH4"),
  ion_mode="positive"
);
plotgroup(pattern,adduct,groupID=3,massrange=10,allmass=FALSE)
#############################################################


blosloos/nontarget documentation built on June 2, 2022, 3:53 p.m.