Finding out the start and end point of a peak
Posted: Wed Jan 02, 2013 11:18 pm
by woa
I'm trying to find out area's under different peaks for a number of chromatograms. For calculating the area I'm using the "DrawChromatogram" function from the R package ‘OrgMassSpecR’. However DrawChromatogram() requires defining the start and end point of a peak to calculate the area underneath it.
I'm having difficulties in defining the start and end position of peak. So far I've used isPeak {PROcess} and SpectrumSearch{Peaks} package but without any good result.
Can anybody suggest some good tools in R/Python/Perl etc. which will be able to find out and (optionally) integrate peak areas?
Thanks
Re: Finding out the start and end point of a peak
Posted: Fri Jan 04, 2013 9:23 am
by aceto_81
Sounds like a nice project!
I think you should base your calculations on the way current CDS are working.
I think you should make a threshold to specify when a baseline is raised high enough to be determined as peak start, and if there is a drop which is lower than the threshold in a certain time window, then you have your peak (traditional algorithm).
Or you can base your calculations on the second derrivative of your chrom.
I never used R to calculate areas, but I'm glad to help you
Ace
Re: Finding out the start and end point of a peak
Posted: Mon Jan 07, 2013 5:21 pm
by lmh
The xcms package for R, available from the Scripps institute, includes objects that integrate chromatograms and return the start and stop points of the peaks, together with their integrated area. However, it expects to work on full-scan MS data, also telling you the mass of each peak it finds. If you want to try this, install xcms and look for FindPeaks.
If you're working with pure chromatographic data with no mass direction, xcms won't help you, unless you want to look at the inner workings to see some peak-finding algorithms (it has various approaches).
If you're only interested in known peaks at known retention times, and you're trying to produce your own integrator, then xcms would be an inefficient thing to use (but if you're doing that, I'd really, really strongly recommend getting hold of a proper chromatography analysis system, either that supplied by the manufacturer, or ask here nicely and someone will advise on a free general-purpose system whose name I can't remember...).