recMID: recMID.

View source: R/recMID.R

recMIDR Documentation

recMID.

Description

recMID will reconstruct a measured GC-APCI-MS spectrum of a compound given its true MID and the fragment ratio.

Usage

recMID(
  mid = NULL,
  r = list(`M+H` = 1),
  fml = NULL,
  cutoff = 0.001,
  algo = c("CorMID", "Rdisop")
)

## S3 method for class 'recMID'
plot(x, ...)

Arguments

mid

A numeric vector with sum=1 and length of C atoms +1.

r

Fragment ratios. A numeric vector with sum=1.

fml

A compound formula.

cutoff

Remove values below this threshold from output vector.

algo

The algorithm used to estimate the isotopic distribution of a chemical formula.

x

Object of class recMID.

...

Further plotting parameters.

Details

recMID is basically the inverse function to CorMID. Providing a specific chemical formula together with information regarding the true MID and r, this function will compute a vector of ion intensities which can be expected in a GC-APCI-MS analysis for this compound.

Value

A reconstructed MID.

Examples

fml <- "C9H20O3Si2"
mid <- c(0.9,0,0,0.1)
r <- list("M+H"=0.8, "M-H"=0.1, "M+H2O-CH4"=0.1)
(rMID <- CorMID::recMID(mid=mid, r=r, fml=fml))
plot(rMID)
plot(x = rMID, ylim=c(0,max(rMID)))
plot(x = rMID, xlim=c(-2,12), ylim=NULL, col=2, lwd=12, las=2, xlab="label")

CorMID::CorMID(int = rMID, fml=fml, prec=0.001, r=unlist(r), trace_steps = TRUE)


CorMID documentation built on Oct. 2, 2024, 5:06 p.m.