find_hits: Find putative theoretical features for each measured feature

Description Usage Arguments Value Examples

View source: R/annotate_features.R

Description

Identifies all possible theoretical features within an user defined ppm window around the measured mz value of each measured feature. The result includes only those theoretical features that are potential candidates for at least one measured feature and orphan isotopes are removed if no hit is identified for the corresponding monoisotope.

Usage

1

Arguments

info.features

data.frame with information about theoretical possible features (e.g. as generated by the function chem_formula_2_adducts).

dat

data.frame with information about measured features with columns id (= unique identifier), mz (= measured mz value), intensity (= measured intensity).

ppm

Numeric. Resolution of mass spectrometer.

Value

matrix with measured features in rows and theoretical possible features in columns (1 = measured feature within ppm distance to theoretical feature, 0 = otherwise).

Examples

1
2
3
4
5
6
7
data("se.example")
data("info.features")

dat = prepare_data_for_annotation(se = se.example)
hits.m = find_hits(info.features = info.features,
                   dat = dat,
                   ppm = 20)

szymczak-lab/preprocessHighResMS documentation built on Oct. 6, 2020, 12:50 a.m.