Identify peaks which are exclusively associated with a given m/z and thus can be unambiguously identified across samples for retention time alignment.

find_candidate_anchors(
  mzroll_db_con,
  clamr_config,
  n_anchors = 30L,
  anchor_rank_cutoff = 0.5
)

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.

n_anchors

number of anchor points to search for.

anchor_rank_cutoff

rank cutoff for a viable anchors, smaller is better, ranks are scaled to [0,1].

Value

a tibble containing the 10-best scoring mz, rt pairs within each rt bin.

Details

The function aims to identify mz, rt pairs which can serve as anchor points for retention time alignment. MAVEN will find these anchors in each sample and enforce that all anchors peaks have the same retention time, other peaks retention times will then be shifted by linearly interpolating between flanking anchors.

Examples

if (FALSE) {
future::plan("multicore")
mzroll_db_con <- clamr::mzroll_db_sqlite("/tmp/M005A-set123.mzrollDB")
clamr_config <- clamr::build_clamr_config(list(MS1tol = "10ppm", MS2tol = "20ppm"))
find_candidate_anchors(mzroll_db_con, clamr_config, n_anchors = 30L, anchor_rank_cutoff = 0.5)
}