alignedXIC: Create an aligned chromatogram

Description Usage Arguments Value Author(s) See Also Examples

View source: R/merge_chromatogram.R

Description

Modifies chromatogram to have the same length as indices. Imputes missing values with appropriate method. Time and intensity for the flanking missing indices are set as NA.

Usage

1
2
3
4
5
6
7
8
alignedXIC(
  XIC,
  indices,
  method = "spline",
  polyOrd = 4,
  kernelLen = 9,
  splineMethod = "fmm"
)

Arguments

XIC

(data-frame) first column is time, second column is intensity.

indices

(integer) vector of monotonically increasing integers.

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".

Value

(dataframe) has two columns:

time

(numeric)

intensity

(numeric)

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

childXIC, imputeChromatogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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"]]
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(alignedXIC(XICs.ref[[1]], alignedIndices[,"indexAligned.ref"]), type = "l")

## End(Not run)

Roestlab/DIAlign documentation built on Feb. 25, 2021, 5:18 p.m.