getChildXICpp: Get child chromatogram from two parent chromatogram

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

Get child chromatogram from two parent chromatogram

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
getChildXICpp(
  l1,
  l2,
  kernelLen,
  polyOrd,
  alignType,
  adaptiveRT,
  normalization,
  simType,
  B1p = 0,
  B2p = 0,
  goFactor = 0.125,
  geFactor = 40,
  cosAngleThresh = 0.3,
  OverlapAlignment = TRUE,
  dotProdThresh = 0.96,
  gapQuantile = 0.5,
  kerLen = 9L,
  hardConstrain = FALSE,
  samples4gradient = 100,
  wRef = 0.5,
  splineMethod = "natural",
  mergeStrategy = "avg",
  keepFlanks = TRUE
)

Arguments

l1

(list) A list of numeric matrix of two columns. l1 and l2 should have same length.

l2

(list) A list of numeric matrix of two columns. l1 and l2 should have same length.

kernelLen

(integer) length of filter. Must be an odd number.

polyOrd

(integer) TRUE: remove background from peak signal using estimated noise levels.

alignType

(char) A character string. Available alignment methods are "global", "local" and "hybrid".

adaptiveRT

(numeric) Similarity matrix is not penalized within adaptive RT.

normalization

(char) A character string. Normalization must be selected from (L2, mean or none).

simType

(char) A character string. Similarity type must be selected from (dotProductMasked, dotProduct, cosineAngle, cosine2Angle, euclideanDist, covariance, correlation, crossCorrelation).
Mask = s > quantile(s, dotProdThresh)
AllowDotProd= [Mask × cosine2Angle + (1 - Mask)] > cosAngleThresh
s_new= s × AllowDotProd

B1p

(numeric) Timepoint mapped by global fit for tA[1].

B2p

(numeric) Timepoint mapped by global fit for tA[length(tA)].

goFactor

(numeric) Penalty for introducing first gap in alignment. This value is multiplied by base gap-penalty.

geFactor

(numeric) Penalty for introducing subsequent gaps in alignment. This value is multiplied by base gap-penalty.

cosAngleThresh

(numeric) In simType = dotProductMasked mode, angular similarity should be higher than cosAngleThresh otherwise similarity is forced to zero.

OverlapAlignment

(logical) An input for alignment with free end-gaps. False: Global alignment, True: overlap alignment.

dotProdThresh

(numeric) In simType = dotProductMasked mode, values in similarity matrix higher than dotProdThresh quantile are checked for angular similarity.

gapQuantile

(numeric) Must be between 0 and 1. This is used to calculate base gap-penalty from similarity distribution.

kerLen

(integer) In simType = crossCorrelation, length of the kernel used to sum similarity score. Must be an odd number.

hardConstrain

(logical) if false; indices farther from noBeef distance are filled with distance from linear fit line.

samples4gradient

(numeric) This parameter modulates penalization of masked indices.

wRef

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

splineMethod

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

mergeStrategy

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

keepFlanks

(logical) TRUE: Flanking chromatogram is not removed.

Value

(List) of chromatograms and their aligned time vectors.

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca ORCID: 0000-0003-3500-8152 License: (c) Author (2021) + MIT Date: 2021-01-08

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(XIC_QFNNTDIVLLEDFQK_3_DIAlignR, package="DIAlignR")
XICs <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR
XICs.ref <- lapply(XICs[["hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]], as.matrix)
XICs.eXp <- lapply(XICs[["hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"]][["4618"]], as.matrix)
B1p <- 4964.752
B2p <- 5565.462
chrom <- getChildXICpp(XICs.ref, XICs.eXp, 11L, 4L, alignType = "hybrid", adaptiveRT = 77.82315,
 normalization = "mean", simType = "dotProductMasked", B1p = B1p, B2p = B2p,
 goFactor = 0.125, geFactor = 40, cosAngleThresh = 0.3, OverlapAlignment = TRUE,
 dotProdThresh = 0.96, gapQuantile = 0.5, hardConstrain = FALSE, samples4gradient = 100,
 wRef = 0.5, keepFlanks= TRUE)

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