getAlignedTimes: Get aligned Retention times.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/pairwise_pep_peak_corp.R

Description

This function aligns XICs of reference and experiment runs. It produces aligned retention times between refernce run and experiment run.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
getAlignedTimes(
  XICs.ref,
  XICs.eXp,
  globalFit,
  alignType,
  adaptiveRT,
  normalization,
  simMeasure,
  goFactor,
  geFactor,
  cosAngleThresh,
  OverlapAlignment,
  dotProdThresh,
  gapQuantile,
  kerLen,
  hardConstrain,
  samples4gradient,
  objType = "light"
)

Arguments

XICs.ref

List of extracted ion chromatograms from reference run.

XICs.eXp

List of extracted ion chromatograms from experiment run.

globalFit

Linear or loess fit object between reference and experiment run.

alignType

Available alignment methods are "global", "local" and "hybrid".

adaptiveRT

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

normalization

(character) Must be selected from "mean", "l2".

simMeasure

(string) Must be selected from dotProduct, cosineAngle, crossCorrelation, cosine2Angle, dotProductMasked, euclideanDist, covariance and correlation.

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.

objType

(char) Must be selected from light, medium and heavy.

Value

(list) the first element corresponds to the aligned reference time, the second element is the aligned experiment time.

Author(s)

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

ORCID: 0000-0003-3500-8152

License: (c) Author (2019) + GPL-3 Date: 2019-12-13

See Also

alignChromatogramsCpp, getAlignObj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(XIC_QFNNTDIVLLEDFQK_3_DIAlignR, package="DIAlignR")
data(oswFiles_DIAlignR, package="DIAlignR")
run1 <- "hroest_K120809_Strep0%PlasmaBiolRepl2_R04_SW_filt"
run2 <- "hroest_K120809_Strep10%PlasmaBiolRepl2_R04_SW_filt"
XICs.ref <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run1]][["4618"]]
XICs.eXp <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR[[run2]][["4618"]]
RUNS_RT <- getRTdf(oswFiles_DIAlignR, ref = "run1", eXp = "run2", maxFdrGlobal = 0.05)
globalFit <- loess(RT.eXp ~ RT.ref, data = RUNS_RT, span = 0.1, control=loess.control(surface="direct"))
adaptiveRT <- 77.82315 #3.5*globalFit$s
getAlignedTimes(XICs.ref, XICs.eXp, globalFit, alignType = "hybrid",
 adaptiveRT = adaptiveRT, normalization = "mean",
  simMeasure = "dotProductMasked", goFactor = 0.125, geFactor = 40, cosAngleThresh = 0.3,
  OverlapAlignment = TRUE, dotProdThresh = 0.96, gapQuantile = 0.5, kerLen = 9L, hardConstrain = FALSE,
  samples4gradient = 100)

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