Learn R Programming

nontarget (version 1.9)

deter.iso: Generating list of type iso from filtered m/z differences.

Description

Produces a list of m/z differences from diffs output generated by plotdiff to be used as argument iso in pattern.search. Thus, replaces the iso argument to pattern.search from make.isos and isotopes by another iso argument of the most frequent m/z differences detected among the HRMS peaks by plotdiff.

Usage

deter.iso(diffs, histbreaks = 50000, mzmin = 0, mzmax = 0.5, cutcount = 180, plotit = TRUE)

Arguments

diffs
vector diffs, i.e. output of function plotdiff
histbreaks
Number of histogram breaks; thus defines the mztol window to be used with pattern.search, see details.
mzmin
Minimum value for m/z differences in resulting iso list.
mzmax
Maximum value for m/z differences in resulting iso list.
cutcount
Histogram classes with frequencies below cutcount will be excluded from iso
plotit
Should a plot of the sekected histogram classes be plotted? Recommended.

Value

List of type iso with 5 entries

Details

In addition to returning a iso argument, prints argument values for mztol, ppm and deter of pattern.search when using iso from deter.iso. Also see deter argument of pattern.search.

See Also

pattern.search plotdiff make.isos

Examples

Run this code

data(peaklist)
diffs<-plotdiff(peaklist, histbreaks = 10000, rttol = c(0, 0), mztol = c(0.3, 100), plotit = TRUE);
iso<-deter.iso(diffs,histbreaks=10000,mzmin=0,mzmax=40,cutcount=500,plotit=TRUE);
pattern<-pattern.search(
  peaklist,
  iso,
  cutint=10000,
  rttol=c(-0.05,0.05),
  mztol=0.005,
  mzfrac=0.1,
  ppm=FALSE,
  inttol=0.2,
  #rules=c(FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE),
  rules=c(TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE),
  deter=TRUE,
  entry=50
);

Run the code above in your browser using DataLab