Postdoctoral researcher in Computational Metabolomics The Institute for Biomedicine is seeking a highly motivated researcher to join the Computational Metabolomics team.
The Institute for Biomedicine is home to an international and interdisciplinary team of scientists, students and support staff, integrated in an excellent network of international and national partners. Living and working in Bozen/Bolzano allows you to experience a unique combination of alpine and Mediterranean culture right at the heart of one of the most exciting mountain regions in Europe.
The Institute for Biomedicine is running the Cooperative Health Research in South Tyrol (CHRIS) study, a population-based study on cardiometabolic and neurological health of 13,000 general population subjects  that excels with a high participation rate from complete families. From this population study, targeted (Biocrates p180) and (HILIC) LC-MS-based untargeted metabolomics data are available for 7,500 individuals. The Computational Metabolomics group of the Institute contributes to a variety of software packages, including xcms, MSnbase  and other mass-spectrometry related software . The second strong focus of the group is on the planning of metabolomics experiments and on the analysis of metabolomics data sets generated at the Institute. The successful candidate will hence perform analyses of large-scale metabolomics experiments, contribute to software development and is expected to write scientific articles.
excellent suggestion! The parameters are however already vectorized. peakCol, peakBg and peakPch can be either of length 1 or length equal to the number of peaks the XChromatogram/XChromatograms object has peaks (i.e. nrow(chromPeaks(x)) with x being a XChromatogram or an XChromatograms object). You can then define the color for each individual peak (the order of the colors passed along has to match the order of the peaks returned by chromPeaks.
Thanks for the feedback - indeed we might have to check the code again. I've never centroided MS2 data so far.
The good news is that we've added the msLevel parameter to the pickPeaks method. This means you could call pickPeaks on your object with msLevel. = 1L to perform the centroiding only on MS 1 and keep the MS2 spectra as they are.
To use the new functionality you would however have to switch to the current Bioconductor developmental version:
so far there is no possibility to do the peak picking (centroiding) separately for each MS level (or to do that specifically on a single MS level). I've added an issue in MSnbase (https://github.com/lgatto/MSnbase/issues/478) and will work on that.
Meanwhile, could you please check if you can do the peak picking at all in MS2 (i.e. read only MS2 data, or use filterMsLevel to restrict the data to MS level 2 only and call pickPeaks on that data)?
I'm no expert in MS2 data analysis but I'd say that also MS2 data should be centroided. Note also that if you do the centroiding with the pickPeaks function from MSnbase you will by default centroid MS1 and MS2 spectra in your object.
the *peak density* alignment method requires a certain number of features (AKA grouped peaks) across all samples to perform the alignment. Without knowing more about your data it is pretty hard to tell what the problem is. I'd suggest you redo the correspondence analysis (peak grouping) with less stringent settings and retry.
Secondly: I would suggest that you switch over to the *new* user interface and functions (see https://bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html for details). There you will e.g. also have the possibility to do the alignment on a subset of samples (e.g. if you have QC samples) or to exclude blank samples from the alignment (these in fact could cause the problem described above).
## Subset to one file, assuming xdata is an XCMSnExp with identified chrom peaks xdata_1 <- filterFile(xdata, 1) chrs <- chromatogram(xdata_1, rt = chromPeaks(xdata_1)[, c("rtmin", "rtmax")], mz = chromPeaks(xdata_1)[, c("mzmin", "mzmax")]) head(lengths(chrs)) ## median number of scans for all peaks in a the file median(lengths(chrs))
Note: this should be done separately for each file, hence the filterFile step.
AFAIK xcmsOnline uses an old version of xcms (that's what you see in the logs) - and most likely also an old version of R. The development of xcms and xcmsOnline somehow diverged at some point and all the new developments in xcms (aka xcms3) are not used/available in the online version.
For a thourough comparison one would however have to start with an standalone R xcms version 1.47.3 and compare its results to those of xcmsOnline. Could be that xcmsOnline has some internal helper functions and modifications that are not available in the standalone R version of xcms ... but I am only guessing here.
I would be careful with the scmin/scmax lmin/lmax columns - I do not recall what they exactly mean. We do by default not record from which spectrum the data of a chromatographic peak comes, but with the retention time and m/z range available it is easy to subset/extract all spectra for one chromatographic peak.
What exactly do you want/need to do with the data? Maybe there is a simple solution for that...
I'm also not familiar with SRM/MRM data. But we have implemented a readSRMData function in MSnbase to read chromatographic data from mzML files. Would be nice to know if that works for you and what is missing. Note also that xcms can do now peak detection also on purely chromatographic data (i.e. Chromatogram/Chromatograms classes which are returned by the readSRMData function).
Thanks for sharing your ideas. If you would like some changes in xcms I would however appreciate if you open an issue at the xcms github repository as this enables me also to keep track of what to do (and what was done) - a pull request would actually be even better
Regarding the code in xcms centWave - I did not write that code and I am veeerrry hesitant to change anything within it as this will affect all xcms users.