Commit d3106dfa authored by joerg.buescher's avatar joerg.buescher
Browse files

refining smoothing of consensus peaks

parent c10cf75c
......@@ -29,6 +29,9 @@ if ('fwhm' %in% names(msd[[1]][[1]]) ) {
allqs <- c(allqs, unlist(sapply(msd, '[[', id)['qs', ]) )
}
typicalfwhm <- median(allfwhm[allqs > 0.9], na.rm = TRUE)
if (prm$verbose > 1) {
print(paste('found typical fwhm to be', typicalfwhm, 'scans'))
}
} else {
typicalfwhm <- 15
}
......@@ -208,7 +211,7 @@ for (im in 1:prm$nmet) {
# peak detection on weighted sum of single traces
p00 <- rowSums(cbind(p1/max(p1,na.rm = TRUE), p2/max(p2,na.rm = TRUE), p3/max(p3,na.rm = TRUE)), na.rm = TRUE)
# determine candidates and their qs scores
p0 <- zoo::rollmean(p00, round(typicalfwhm/5), fill=0, align='center')
p0 <- zoo::rollmean(p00, round(typicalfwhm/3) , fill=0, align='center') #
sp0 <- diff(p0)
maxsp0 <- max(abs(sp0))
local_max <- which(diff(sign(sp0))==-2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment