Learn R Programming

CorMID (version 0.3.1)

recMID: 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 = c(1, 0, 0),
  r = list(`M+H` = 1),
  fml = NULL,
  cutoff = 0.001,
  algo = c("CorMID", "Rdisop")
)

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

Value

A reconstructed MID, i.e. the relative intensity values that would be measured for the specified molecule `fml` with respect to parameters``mid` and `r`. The default values for `mid` and `r` are set to reflect natural abundance and no fragmentation.

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.

Examples

Run this code
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")
# \donttest{
CorMID::CorMID(int = rMID, fml=fml, prec=0.001, r=unlist(r), trace_steps = TRUE)
# }

Run the code above in your browser using DataLab