twod_cow: Two-dimensional correlation optimized warping alignment

View source: R/twod_cow.R

twod_cowR Documentation

Two-dimensional correlation optimized warping alignment

Description

This is an adaptation of two-dimesional COW alignment, first implemented in MATLAB \insertCiteTomasi2004RGCxGC. This functions takes a sample chromatogram to be aligned against a reference. The argument [segment] will be used to split the whole chromatogram in n and m parts the first and the second dimension, respectively. The [max_warp] argument provides de maximum tolerance of the signal transformation for the first and the second dimension \insertCiteDabaoZhang2008RGCxGC.

Usage

twod_cow(sample_chrom, ref_chrom, segments, max_warp)

Arguments

sample_chrom

A GCxGC class chromatogram imported by read_chrom function or a preprocessed chromatogram.

ref_chrom

A representative GCxGC chromatogram chosen to be the template which sample_chrom will be aligned.

segments

A two integer vector with number of segments which the first and second dimension will be divided, respectively.

max_warp

A two integer vector with the maximum warping parameter.

References

\insertAllCited

Examples


GB08_fl <- system.file("extdata", "08GB.cdf", package = "RGCxGC")
GB09_fl <- system.file("extdata", "09GB.cdf", package = "RGCxGC")
GB08 <- read_chrom(GB08_fl, 5L)
GB09 <- read_chrom(GB09_fl, 5L)

GB09_al <- twod_cow(sample_chrom = GB09, ref_chrom = GB08,
                    segments = c(20, 40), max_warp = c(2, 8))



RGCxGC documentation built on Dec. 28, 2022, 3:02 a.m.