inst/estimate_baseline_noise.md

Baseline Estimations

library(centWaveP)
library(ggplot2)

HILIC, 60 minute gradient, 150 mm x 1 mm x 3 um, 50 uL/min

eic = readRDS("eic.rds")

ggplot(eic) + 
  geom_line(aes(x = rt, y = i))

plot of chunk unnamed-chunk-2

ggplot(subset(eic,abs(rt - 1300) < 200)) + 
  geom_line(aes(x = rt, y = i))

plot of chunk unnamed-chunk-2

eic.n = estimateBaselineNoise(eic, peakwidth = c(15,70), minslope.peak = 2000, plot.tf = T)

plot of chunk unnamed-chunk-2plot of chunk unnamed-chunk-2

ggplot(subset(eic.n, abs(rt - 1300) < 200)) + 
  geom_line(aes(x = rt, y = i)) +
  geom_line(aes(x = rt, y =noise.local.sd), colour = "red") +
  geom_line(aes(x = rt, y =baseline), colour = "orchid") +
  geom_line(aes(x = rt, y =noise.baseline.sd), colour = "green")

plot of chunk unnamed-chunk-2

ggplot(subset(eic.n,abs(rt - 1020) < 70)) + 
  geom_line(aes(x = rt, y = i)) +
  geom_line(aes(x = rt, y =noise.local.sd), colour = "red") +
  geom_line(aes(x = rt, y =baseline), colour = "orchid") +
  geom_line(aes(x = rt, y =noise.baseline.sd), colour = "green")

plot of chunk unnamed-chunk-2

Plateau peak

eic = { dnorm(seq(-6, 6, by =0.1)) + dnorm(seq(-6, 6, by =0.1), mean = 2) } %>% { ./max(.) }
eic = data.frame( i = eic, rt = seq(eic), scan = seq(eic))

ggplot(eic) + 
  geom_line(aes(x = rt, y = i))

plot of chunk unnamed-chunk-3

eic.n = estimateBaselineNoise(eic, peakwidth = c(15, 70), minslope.peak = .005, plot.tf = T)

plot of chunk unnamed-chunk-3plot of chunk unnamed-chunk-3

ggplot(eic.n) + 
  geom_line(aes(x = rt, y = i)) +
  geom_line(aes(x = rt, y =noise.local.sd), colour = "red") +
  geom_line(aes(x = rt, y =baseline), colour = "orchid") +
  geom_line(aes(x = rt, y =noise.baseline.sd), colour = "green")

plot of chunk unnamed-chunk-3

eic.n = estimateBaselineNoise(eic, peakwidth = c(15, 20), minslope.peak = .005, plot.tf = T)

plot of chunk unnamed-chunk-3plot of chunk unnamed-chunk-3

ggplot(eic.n) + 
  geom_line(aes(x = rt, y = i)) +
  geom_line(aes(x = rt, y =noise.local.sd), colour = "red") +
  geom_line(aes(x = rt, y =baseline), colour = "orchid") +
  geom_line(aes(x = rt, y =noise.baseline.sd), colour = "green") + main("Inappropriate max peakwidth setting.")
## Error in eval(expr, envir, enclos): could not find function "main"


nathaniel-mahieu/centWaveP documentation built on May 23, 2019, 12:19 p.m.