the ptw package
play

The PTW package Institute for Molecules and Materials Dept. - PowerPoint PPT Presentation

Global Parametric Time Warping in R Tom Bloemberg The PTW package Institute for Molecules and Materials Dept. Chemometrics / Analytical Chemistry www.ru.nl/imm Global Parametric Time Warping in R The PTW package Chromatographic example


  1. Global Parametric Time Warping in R Tom Bloemberg The PTW package Institute for Molecules and Materials Dept. Chemometrics / Analytical Chemistry www.ru.nl/imm

  2. Global Parametric Time Warping in R The PTW package Chromatographic example

  3. Global Parametric Time Warping in R The PTW package Alignment • Also: – ‘Synchronization’ – ‘(Time) Warping’ • Shift, stretch, compress • Applications in: – Speech analysis – Chromatography – NMR – …

  4. Global Parametric Time Warping in R The PTW package Parametric Time Warping 1 Reference( ) Sample( ) t ↔ t • Before warping: Reference( ) Sample( ( )) t ↔ w t • After warping: • Polynomial model of warping function: Q ∑ 2 ( ) ... ( ) = + + + = q w t a a t a t w t a q t 0 1 2 0 q = • Minimize: ( ) ∑ 2 Reference ( ) Sample ( ( )) − t w t i i i �� ����������������� �������������������� ������������������� ����

  5. Global Parametric Time Warping in R The PTW package A single alignment > library(ptw) > data(chromatograms) > chromatograms <- basel.off(chromatograms) > C.warped <- ptw(chromatograms[1, ], chromatograms[16, ]) > plot(C.warped, plot.orig=TRUE, plot.wf=TRUE)

  6. Global Parametric Time Warping in R The PTW package Multiple alignments > library(ptw) > library(ptw) > data(chromatograms) > data(chromatograms) > chromatograms <- basel.off(chromatograms) > chromatograms <- basel.off(chromatograms) > C.warped <- ptw(chromatograms[1:8, ], chromatograms[9:16, ]) > C.warped <- ptw(chromatograms[1, ], chromatograms[2:16, ]) > plot(C.warped, plot.orig=TRUE, plot.wf=TRUE) > plot(C.warped, plot.orig=TRUE, plot.wf=TRUE)

  7. Global Parametric Time Warping in R The PTW package LC-MS data m/z m/z T T

  8. Global Parametric Time Warping in R The PTW package LC-MS data Signal m/z m/z T T

  9. Global Parametric Time Warping in R The PTW package Global Alignment Choose ‘High Quality’ traces using CODA 2,3 • m/z Time > library(ptw) > data(LCMS) > HQ <- coda(LCMS, combine=c(1,2), windows=c(3,1), nChroms=5) > LCMS.Warped <- ptw(LCMS[1, , ], LCMS[2, , ], HQ=HQ, align.method=“global”) � ����� ����� �������������������� �!��������"����"������ �##� " ������������� �������������������� !����!���������������� ���!

  10. Global Parametric Time Warping in R The PTW package Global Alignment > library(ptw) > library(ptw) > data(LCMS) > data(LCMS) > HQ <- coda(LCMS, combine=c(1,2), windows=c(3,1), nChroms=5) > HQ <- coda(LCMS, combine=c(1,2), windows=c(3,1), nChroms=5) > LCMS.Warped <- ptw(LCMS[1,,], LCMS[2,,], HQ=HQ, > LCMS.Warped <- ptw(colSums(LCMS[1, , HQ]), align.method = “global”) colSums(LCMS[2, , HQ]), align.method = “individual”)

  11. Global Parametric Time Warping in R The PTW package Discussion Second alignment package for R (next to dtw ) • • Individual, multiple and global warpings • Trace selection (CODA) • Baseline removal (asymmetric LS) • Smoothing (Whittaker)

  12. Global Parametric Time Warping in R The PTW package Planning • Implement semi-PTW • Implement other distance measures Connect with dtw -package • • Release on 1 September 2009

  13. Global Parametric Time Warping in R The PTW package Acknowledgements Jan Gerretzen Hans Wouters Ron Wehrens Lutgarde Buydens Paul Eilers Jolein Gloerich Hans Wessels Bert van der Heuvel

Recommend


More recommend