Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - Tony

3
XCMS / Re: Centroiding of profile-mode DDA data, MS2-level
Hi,

sure, I tried:
cent_file <- pickPeaks(x = raw_file, refineMz = "descendPeak", signalPercentage = 33, msLevel. = 1, verbose = TRUE)

I receive:
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘pickPeaks’ for signature ‘"missing"’

the raw file is a DDA-sample.
MSn experiment data ("OnDiskMSnExp")
Object size in memory: 2.67 Mb
- - - Spectra data - - -
 MS level(s): 1 2
 Number of spectra: 7205
 MSn retention times: 0:0 - 21:60 minutes
- - - Processing information - - -
Data loaded [Thu Sep 19 13:36:33 2019]
 MSnbase version: 2.11.6
- - - Meta data  - - -
phenoData
  rowNames:   xyz.mzML
  varLabels: sampleNames
  varMetadata: labelDescription
Loaded from:
  xyz.mzML
protocolData: none
featureData
  featureNames: F1.S0001 F1.S0002 ... F1.S7205 (7205 total)
  fvarLabels: fileIdx spIdx ... spectrum (35 total)
  fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'

kind regards
Tony
4
XCMS / Re: Centroiding of profile-mode DDA data, MS2-level
Hello johannes.rainer/developers,

I was now able to switch to the recent BioC devel (3.10), installed all dev-packages and retested the centroiding of the DDA samples again, with:

>   packageVersion("BiocManager")
[1] ‘1.30.4’
>   packageVersion("MSnbase")
[1] ‘2.11.6’
>   packageVersion("xcms")
[1] ‘3.7.2’

R-Version: 3.6.1, 64 bit, Windows

and used the new parameter "msLevel." with

cent_file <- pickPeaks(smooth(raw_file, method = "SavitzkyGolay", halfWindowSize = 3),
                       refineMz = "descendPeak", signalPercentage = 33, msLevel. = 1)
                 
but still getting:

Writing 1 mzml file.
Saving file xyz.mzML...Error: fun(object@intensity, halfWindowSize = halfWindowSize, ...) : ‘halfWindowSize’ is too large!
In addition: There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
1: In smooth_Spectrum(x, method = match.arg(method), halfWindowSize = halfWindowSize,  ... :
  Negative intensities generated. Replaced by zeros.
2: In smooth_Spectrum(x, method = match.arg(method), halfWindowSize = halfWindowSize,  ... :
  Negative intensities generated. Replaced by zeros.
3: In smooth_Spectrum(x, method = match.arg(method), halfWindowSize = halfWindowSize,  ... :

It seems that the alternative to restrict to msLevel. = 1 is yet (so far) unfortunately not a solution to centroid the DDA runs on MS1 with disregarded MS2. The instrument is a ABSciex Triple ToF 5600.

Thanks again for the work done on this so far and maybe suggestions/workarounds on how to cope with this DDA runs in the future.
                 
kind regards
Tony
6
XCMS / Vectorized Colors for plotting XChromatogram
Dear Develops,

would it be possible for the plotting functions such as:

## XChromatograms {xcms}
## S4 method for signature 'XChromatogram,ANY'
## plot(x, col = "#00000060", lty = 1, type = "l", xlab = "retention time", ylab = "intensity", main = NULL, peakType = c("polygon", "point", "rectangle", "none"), peakCol = "#00000060", peakBg = "#00000020", peakPch = 1, ...)

## plotChromPeakDensity,XCMSnExp-method {xcms}         
## S4 method for signature 'XChromatograms'
##plotChromPeakDensity(object, param, col = "#00000060", xlab = "retention time", main = NULL, peakType = c("polygon", "point", "rectangle", "none"), peakCol = "#00000060", peakBg = "#00000020", peakPch = 1, simulate = TRUE, ...)

to have the arguments:
peakCol = "#00000060", peakBg = "#00000020" (maybe also peakPch = 1) to be able to take vectorized colors like in the argument col?

This would enable mor freedom whilst plotting.

kind regards
Tony

[attachment deleted by admin]
8
XCMS / Re: Centroiding of profile-mode DDA data, MS2-level
Hi Johannes,

many thanks for your support.

I adopted as you suggested to:

setwd(pathInput)
raw_file <- readMSData(files = file, pdata = NULL, mslevel. = NULL, centroided. = FALSE, smoothed. = FALSE, mode = "onDisk", verbose = TRUE)

Reading 7205 spectra from file xyz.mzML
object.size(raw_file)
2683024 bytes

raw_file <-  filterMsLevel(object = raw_file, msLevel. = 2)
object.size(raw_file)
1110312 bytes

cent_file <- pickPeaks(smooth(raw_file, method = "SavitzkyGolay", halfWindowSize = 2),    # halfWindowSize lowered to 2
                  refineMz = "descendPeak", signalPercentage = 33)
object.size(cent_file)
1115880 bytes   # (why?)

setwd(pathOutput)
writeMSData(object = cent_file, outformat = "mzml", file = file, copy = TRUE, merge = FALSE, verbose = TRUE)

Writing 1 mzml file.
Saving file xz.mzML...Error: fun(object@intensity, halfWindowSize = halfWindowSize, ...) : ‘halfWindowSize’ is too large!


If I further even lower to halfWindowSize = 1, I get:
Writing 1 mzml file.
Saving file xyz.mzML...Error in solve.default(t(X) %*% X) :
system is computationally singular: reciprocal condition number = 1.19379e-18

Not an expert: May it be meaningful to do the smoothing only, if the number of scans/data points in m/z is sufficiently large with regards to halfWindowSize? In case there are no sufficient points available, just simply skip the centroiding (leave it as it is) and work only with those MS2 data, which are really amenable to centroiding?

thanks
Tony
9
XCMS / Re: Centroiding of profile-mode DDA data, MS2-level
Hello johannes.rainer,

thanks for the advise and help. I tried the following code snippet for both the pure MS1-runs only and then the same for DDA-runs:
 
  setwd(pathInput)
  raw_file <- readMSData(files = file, pdata = NULL, mslevel. = NULL, centroided. = FALSE, smoothed. = FALSE, mode = "onDisk", verbose = TRUE)
  cent_file <- pickPeaks(smooth(raw_file, method = "SavitzkyGolay", halfWindowSize = 3),
                         refineMz = "descendPeak", signalPercentage = 33)
  setwd(pathOutput)
  writeMSData(object = cent_file, outformat = "mzml", file = file, copy = TRUE, merge = FALSE, verbose = TRUE)
 
 
While this code snippet works well for all MS1-runs with no errors, all the DDA-runs stop with the following error:

Writing 1 mzml file.
Saving file xyzDDA.mzML...Error: fun(object@intensity, halfWindowSize = halfWindowSize, ...) : ‘halfWindowSize’ is too large!
In addition: There were 50 or more warnings (use warnings() to see the first 50)
1: In smooth_Spectrum(x, method = match.arg(method), halfWindowSize = halfWindowSize,  ... :
  Negative intensities generated. Replaced by zeros.
 
Peak widths are on average 6 seconds, when playing around with other halfWindowSize, than it is either too large or either too small (going from 2,3,4,5,6). Reading only MS1-level via readMSData(msLevel.=1, ...) would loose the entire MS2-level data completely after serialisation ...

Would there be a way for DDA-runs to centroid only the MS1-level and disregad the MS2-level? Could this be a workaround?

thank you
kind regards
Tony

 
10
XCMS / Centroiding of profile-mode DDA data, MS2-level
Hello developpers/maintainers,

I would like to hear your advice on how to treat DDA (Data Dependent Aquisition) experiments, which were quired in profile-mode.
It is clear from the very nice vignette (https://github.com/jorainer/metabolomics2018) on how to do this for MS1-level, but the question is on how to proceed the MS2-level. Should the MS2-level be centroided also and how can this be achieved including serialisation via MSnbase/xcms?

Thanks for your help
Kind regards
Tony



11
XCMS / Re: Scan numbering for DDA/IDA-experiments
This is simply needed to calculate how many scans each chromatographic peak has in order to set the cycle time and mass range approriately (at least on average).
12
XCMS / Scan numbering for DDA/IDA-experiments
Dear Forum,

we are conducting metabolomic experiments using a AB Sciex 5600 TripleToF with DDA (Data Dependendent Aquisition) unsing R 3.6.0 under MSnbase (2.9.5) and xcms (3.5.5).
So we have MS1-scans and MS2-scans intrinsically in the raw data files.

The question here refers, on how to obtain the correct number of scans per peak in one file. The raw data was read with:
readMSData(files = files, pdata = new("NAnnotatedDataFrame", pd), msLevel. = 1)

Given the information from the function chromPeaks(object, bySample = FALSE, rt = numeric(), mz = numeric(), ppm = 0, type = "any"), this results in the following table.

               mz    mzmin    mzmax     rt  rtmin  rtmax      into      intb     maxo  sn egauss mu sigma  h  f dppm scale scpos scmin scmax lmin lmax sample is_filled
CP000001 185.0415 185.0409 185.0423 46.568 40.745 53.293 1623.3019 1605.9049 193.8009  25     NA NA    NA NA  6    1     9   169   160   178  148  185      1         0
CP000002 185.0419 185.0409 185.0429  3.887  0.724  6.577  763.4537  755.4926 170.2468  21     NA NA    NA NA  6    4     7    15     8    22    3   25      1         0
CP000003 512.8859 512.8845 512.8887 51.321 49.069 52.634  322.0898  319.1189 175.0130 174     NA NA    NA NA  7    8     7   182   175   189   87   93      1         0
CP000004 271.9464 271.9443 271.9484 51.321 48.780 53.293  303.1867  299.2378 142.4416 141     NA NA    NA NA  8    8     7   182   175   189   87   95      1         0
CP000005 385.9267 385.9250 385.9298 51.321 48.780 53.293  275.9011  271.9522 131.7186 131     NA NA    NA NA  9    5     7   182   175   189   87   95      1         0
CP000006 498.9059 498.9042 498.9077 50.666 49.069 53.293  256.1620  252.5414 133.5325 133     NA NA    NA NA 10    7     7   181   174   188   87   94      1         0

Is it okay to use the colums "scmin" "scmax", i.e. to compute scmax - scmin to get the correct number of scans for each peak,
or is there a need to take into account, that several scans need to be omitted for MS2-scans?

Basically the question (for DDA-experiments) simply condenses on how the scan numbering works:
How are the MS1-scans are numbered intrinsically?
How are the MS2-scans are numbered intrinsically?

By the way, what is the meaning of the columns lmin lmax? I could not find the meaning in the documentation of  chromPeaks() ...

Thanks for an answer.

kind regards
Tony
15
XCMS / findChromPeaks-centWave {xcms} - Prefilter Settings and Code Documentation
Dear Forum,

I would like to inquire about the prefilter setting for the function findChromPeaks-centWave {xcms}.

I am using R 3.5.3. under Windows7 (64bit) with packageVersion("MSnbase") ‘2.8.3’ and packageVersion("xcms") ‘3.4.4’.

Concerning the prefilter-parameter, here the code documentation says:

 CentWaveParam(ppm = 25, peakwidth = c(20, 50), snthresh = 10,
  prefilter = c(3, 100), mzCenterFun = "wMean", integrate = 1L,
  mzdiff = -0.001, fitgauss = FALSE, noise = 0,
  verboseColumns = FALSE, roiList = list(),
  firstBaselineCheck = TRUE, roiScales = numeric())

prefilter
numeric(2): c(k, I) specifying the prefilter step for the first analysis step (ROI detection). Mass traces are only retained if they contain at least k peaks with intensity >= I.

For this documentation/explanation, is the term "peak" right here, or is rather "scans" the more adequate word.
From my understanding of the documentation of the prefilter, a peak (consisting of several(10-20) scan points) has to have more than k scans of intensity I.

Is that right?

thanks
Tony