childXIC: Get a child chromatogram from parents

View source: R/merge_chromatogram.R

childXICR Documentation

Get a child chromatogram from parents

Description

Internal gaps in reference chromatogram and corresponding indices in experiment chromatogram are discarded while merging both chromatogram to obtain a child chromatogram.

Usage

childXIC(
  XIC.ref,
  XIC.eXp,
  alignedIndices,
  method = "spline",
  polyOrd = 4,
  kernelLen = 9,
  splineMethod = "fmm",
  wRef = 0.5,
  mergeStrategy = "avg",
  keepFlanks = TRUE
)

Arguments

XIC.ref

(data-frame) extracted ion chromatogram from reference run. Must not contain missing values.

XIC.eXp

(data-frame) extracted ion chromatogram from experiment run. Must not contain missing values.

alignedIndices

(data-frame) must have two columns "indexAligned.ref" and "indexAligned.eXp".

method

(string) must be either "spline", "sgolay" or "linear".

polyOrd

(integer) must be less than kernelLen.

kernelLen

(integer) must be an odd integer.

splineMethod

(string) must be either "fmm" or "natural".

wRef

(numeric) Weight of the reference XIC. Must be between 0 and 1.

mergeStrategy

(string) must be either ref, avg, refStart or refEnd.

keepFlanks

(logical) TRUE: Flanking chromatogram is not removed.

Value

(list) the first element is chromatogram. The second element is aligned parent time-vectors.

time-merging

There are three startegies for calculating time to keep sampling rate equal to parents:
- Use reference time.
- Average time (Non-gap region will have parent's sampling rate).
- Start/end with the average then fixed sampling rate.

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca

ORCID: 0000-0003-3500-8152

License: (c) Author (2020) + GPL-3 Date: 2020-05-23

See Also

mergeXIC, alignedXIC, childXICs

Examples

data(XIC_QFNNTDIVLLEDFQK_3_DIAlignR, package="DIAlignR")
data(alignObj_DIAlignR, package="DIAlignR")
XICs.ref <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]
XICs.eXp <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]]
alignedIndices <- cbind(alignObj_DIAlignR@indexA_aligned, alignObj_DIAlignR@indexB_aligned)
colnames(alignedIndices) <- c("indexAligned.ref", "indexAligned.eXp")
alignedIndices[, 1:2][alignedIndices[, 1:2] == 0] <- NA_integer_
## Not run: 
plot(childXIC(XICs.ref[[1]], XICs.eXp[[1]], alignedIndices)[[1]], type = 'l')

## End(Not run)

shubham1637/DIAlign documentation built on March 27, 2023, 7:12 a.m.