in.peaks.regions: Match data points to the peaks or regions they are in

in.peaks.regionsR Documentation

Match data points to the peaks or regions they are in

Description

These functions take an electrophoresis object and report which of the peaks or regions each data point belongs to, if any.

Usage

in.peaks(electrophoresis)

in.regions(electrophoresis)

Arguments

electrophoresis

An electrophoresis object.

Details

Data points are considered to be within the boundaries of a peak if their original x-value ('aligned.time' for Bioanalyzer, 'relative.distance' for TapeStation) is within the boundaries reported by the Agilent software, but for regions the length boundaries are used.

Warning: If peaks or regions in the reported table overlap, any data point in more than one peak or region will only be matched to the last peak or region it belongs to.

Value

A vector of integers with length nrow(data). Each element is either the integer index of the peak in electrophoresis$peaks or region in electrophoresis$regions that the data point belongs to, or NA if it is not in any of the annotated peaks or regions.

See Also

in.peak, in.region, between.markers


jwfoley/bioanalyzeR documentation built on Aug. 1, 2023, 4:46 a.m.