Apply labels to peak groups based on sample-level coelutions defined by mz differences characteristic of common adducts and isotope mass differences.

peakgrp_coelution_annotation(
  mzroll_db_con,
  clamr_config,
  coelutions,
  minor_edge_filter_fraction = 0.01,
  min_edge_inconsistency_for_root = 1,
  root_weight_constant = 1.25
)

Arguments

mzroll_db_con

a connection to a mzroll database as produced by mzroll_db_sqlite

clamr_config

a named list of mass spec parameters with special formatting of instrument tolerances generated by build_clamr_config.

coelutions

A list containing coelutions and coelution_mz_diffs of the coelution class produced by find_common_coelutions

minor_edge_filter_fraction

peakgroup pairs which coelute less than minor_edge_filter_fraction will not be used for peakgroup aggregation"

min_edge_inconsistency_for_root

When determining the network's roots, ignore edges represented by less than min_edge_inconsistency_for_root samples.

root_weight_constant

W(R) = C / sum(n of daughter edges + 1)

Details

Based on set of valid mz-differences for coelutions (a coelution object containing a set of valid coelution_mz_diffs), build clusters of mzs which are linked via adducts and isotopologues. Pairs of [mz, scan] coelutions which are aggregated if either mz-value is within the supplied mass accuracy tolerance and coelutions are within small scan difference. Build a sample-level map of coelution relationships and then apply this to peaks.