Skip to main content
Topic: annotate() pipeline inconsistencies and findIsotopes filter (Read 1159 times) previous topic - next topic

annotate() pipeline inconsistencies and findIsotopes filter

Hi all,
I am using CAMERA 1.26.0 and noticed there are some inconsistencies in the annotate() defaults compared to running the individual functions; namely:

groupFWHM()
default intval = "maxo"; annotate() passes down default intval  = "into"

findIsotopes()
default intval = "maxo"; annotate() passes down default intval  = "into"
default mzabs = 0.01; annotate() passes down default mzabs = 0.015
default filter = TRUE; annotate() does not recognise "filter" as an argument so it cannot be changed from the default (e.g. to FALSE) in the annotate() pipeline

groupCorr()
default cor_exp_thr = 0.75; annotate() does not recognise "cor_exp_thr" as an argument so it cannot be changed from the default in the annotate() pipeline

I had no end of trouble running a sequence of the core functions with the default values (xsAnnotate(), groupFWHM(), findIsotopes(), groupCorr(), findAdducts()) vs annotate() and getting different results because of these inconsistencies.  Please could the defaults be harmonised, and the filter and cor_exp_thr arguments be made available to pass through in annotate()?

Also, I am having issues with the "filter" argument in findIsotopes.  As far as I can tell, this traces to the relevant code snippet from the CAMERA:::findIsotopesPspec() function (embedded in findIsoptopes()):

theo.mass <- spectra[j, 1] * charge
                      numC <- abs(round(theo.mass/12))
                      inten.max <- int.c12 * numC * 0.011
                      inten.min <- int.c12 * 1 * 0.011
                      if ((int.c13 < inten.max && int.c13 > inten.min) ||
                        !params$filter) {
                     
I read this as the maximum calculated C13 isotope intensity is estimated by taking the total number of carbons in the compound * the natural abundance of the C13 isotope and assuming all C are C13 isotopes.  This will be an overstimate as the numC will always be > the actual number of C as all the mass is not made up of C and not all the C are always C13.  (e.g. for a C12 alkane,  numC as calculated from the expected [M+H]+ = 14). This is fine and allows for a margin or error.  However, in contrast to inten.max, inten.min is a rather hard cutoff as it assumes a minimum of  n = one C13 (fine) but then sets the intesity to a value of the assumed natural abundance * the C12 intensity.  Not so fine as any instrumental measurements that slightly underestimate the C13 isotope intensity (e.g. on my orbitrap where isotope ratio intensities can deviate +/- 20% from theoretical) will fail this minimum estimate.  Why not do this instead:

theo.mass <- spectra[j, 1] * charge
                      numC <- abs(round(theo.mass/12))
                      inten.max <- int.c12 * numC * 0.011
                      if ((int.c13 < inten.max && int.c13 < int.C12) ||
                        !params$filter) {

This way the C13 intensity just has to be less than the C12 intensity for the minimum estimate (OK for small molecules where n C < 90)??

Or alternatively some minimum intensity fudge factor ; e.g. assume up to a 50% minimum intensity measurement error

theo.mass <- spectra[j, 1] * charge
                      numC <- abs(round(theo.mass/12))
                      inten.max <- int.c12 * numC * 0.011
                      inten.min <- int.c12 * 1 * 0.011 * 0.5
                      if ((int.c13 < inten.max && int.c13 > inten.min) ||
                        !params$filter) {

thanks
Tony