do_alignPEAKS: Align dataset's and template peaks using dot-product...

Description Usage Arguments Value See Also

View source: R/functions-alignPEAKS_helpers.R

Description

Internal function used within method alignPEAKS and function annotateDS. Function aligns all dataset's peaks to the template using dot-product estimation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
do_alignPEAKS(
  ds,
  tmp,
  ds_var_name,
  tmp_var_name,
  mz_err,
  rt_err,
  bins,
  ncores,
  cutoff,
  anno = FALSE
)

Arguments

ds

data.frame containing peaks which have to be compared and aligned with the template.

tmp

data.frame representing a template with which the dataset is compared to.

ds_var_name

character indicating the column name for peak grouping information in the dataset. Default is set to 'peakgr', which is the output of groupPEAKS method.

tmp_var_name

character indicating the column name for peak grouping information in the template. If function is used within alignPEAKS, then 'peakgr' should be selected. If function is used within annotatePEAKS, then 'chemid' should be selected.

mz_err

numeric specifying the window for peak matching in the MZ dimension.

rt_err

numeric specifying the window for peak matching in the RT dimension.

bins

numeric defying step size used in peak-group spectra binning and vector generation. Step size represents MZ dimension.

ncores

numeric for number of parallel workers to be used.

cutoff

numeric for spectra similarity score threshold, set to 0.5 by default.

anno

logical whether function is used to align samples or to annotate final features with a database. Set to FALSE by default.

Value

Function returns a list of lenght of the number of peak-groups in the dataset. Each list entry specifies the template's peak-group to which dataset's peak-group was aligned to, as well as matching peaks and obtained cosine.

See Also

For details on cosine estimation, refer to alignPEAKS method.


lauzikaite/massFlowR documentation built on April 29, 2020, 9:45 a.m.