findLabels: findLabels

View source: R/Functions_Labelfinder.R

findLabelsR Documentation

findLabels

Description

find labeled compounds in complist which correspond to unlabeled compounds in reflist

Usage

findLabels(
  reflist,
  complist,
  ref_intensityCols,
  comp_intensityCols,
  labelmz = 2 * 1.00335,
  pktolerance = 20,
  rtdiff = 10,
  ppm_compare = 5,
  ifoldS1 = 10,
  ifoldS2 = 5,
  rawdata = NULL,
  ppm_extract = 5,
  rtw_extract = 5
)

Arguments

reflist

data.frame with molecular features and columns mz, rt, rtmin, rtmax

complist

data.frame with molecular features and columns mz, rt, rtmin, rtmax

ref_intensityCols

intensity column names in reflist

comp_intensityCols

intensity column names in complist

labelmz

expected m/z difference between reference and labeled compounds

pktolerance

maximum fold difference in retention time peak width between matched peaks

rtdiff

maximum retention time difference (same unit as rt columns in reflist and complist, typically seconds)

ppm_compare

ppm m/z tolerance for feature list comparison

ifoldS1

min. fold Iso1/Iso2 in unlabeled

ifoldS2

max. fold Iso1/Iso2 in labeled

rawdata

list of xcmsRaw objects. Item names must be contained in column names

ppm_extract

ppm m/z tolerance for EIC extraction

rtw_extract

retention time window for EIC extraction (seconds, will be applied +/- the expected rt)

Value

a data.frame based on reflist, filtered for features with matches in complist and information on a single match (best rt match).

Examples

## Not run: 
MseekExamplePreload(data = TRUE, tables = TRUE)
findLabelsResults <- findLabels(reflist = tab2$df[,!colnames(tab2$df) %in% c(tab2$intensities, paste0(tab2$intensities,"__norm"))], #remove intensity columns to have them replaced with new ones from rawdata
                                complist = tab2$df[,!colnames(tab2$df) %in% c(tab2$intensities, paste0(tab2$intensities,"__norm"))],
                                ref_intensityCols = tab2$intensities[1:3],
                                comp_intensityCols = tab2$intensities[4:7],
                                labelmz = 2*1.00335,
                                ifoldS1 = 10,
                                ifoldS2 = 10000,
                                rawdata = MSD$data)
 
## End(Not run)
 

mjhelf/Mosaic documentation built on April 28, 2022, 11:32 a.m.