getRTbins: Split a dataset-of-interest and template into _rt_ regions...

Description Usage Arguments Details Value

View source: R/functions-alignPEAKS_helpers.R

Description

Function splits a dataset and a template into rt regions, each of which is analysed by an independent parallel worker.

Usage

1
getRTbins(ds, tmp, ds_var_name, tmp_var_name, mz_err, rt_err, ncores)

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 annotateDS, 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.

ncores

numeric for number of parallel workers to be used.

Details

Function firstly splits the dataset into as many sub-tables as there are parallel workers (could be 1, if serial implementation is selected). Then template is split into the same number of sub-tables using rt regions in the corresponding dataset's sub-tables.

Value

Function returns a list with dataset and template tables split into rt regions.


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