cluster_peaks: Cluster peaks Takes a summary table of peaks with...

View source: R/cluster_peaks.R

cluster_peaksR Documentation

Cluster peaks Takes a summary table of peaks with rt_min/rt_max columns, clusters the peaks based on fraction overlap, returns the same tibble with cluster index.

Description

Cluster peaks Takes a summary table of peaks with rt_min/rt_max columns, clusters the peaks based on fraction overlap, returns the same tibble with cluster index.

Usage

cluster_peaks(peaks, thres_lap)

Arguments

peaks

Tibble with rt_min/rt_max. If there is >1 row per peak, they should be grouped

thres_lap

Fraction of RT overlap required for peaks to cluster (calculated as a fraction of the narrower peak)

Value

Input tibble but with clust_id column added

Examples

peaks_clustered <- peaks %>%
  cluster_peaks(thres_lap = 0.8)


octopode/tidychrom documentation built on Nov. 2, 2022, 1:32 a.m.