rc.merge.split.clusters: rc.merge.split.clusters

View source: R/rc.merge.clusters.R

rc.merge.split.clustersR Documentation

rc.merge.split.clusters

Description

Cluster refinement - scanning instruments (quadrupole, as in GC-MS) can display cluster splitting, possibily due to slight differences in measured peak retentiont time as a function of mass due to scan dynamics. this function enables a second pass clustering designed to merge two clusters if the second cluster is within a small retention time window and shows a sufficiently strong correlation.

Usage

rc.merge.split.clusters(
  ramclustObj = NULL,
  merge.threshold = 0.7,
  cor.method = "spearman",
  rt.sd.factor = 3
)

Arguments

ramclustObj

ramclustR object to annotate.

merge.threshold

numeric. value between -1 and 1 indicating the correlational r threshold above which two clusters will be merged

cor.method

character. default = 'spearman'. correlational method to use for calculating r. see documentation on R base cor() function for available options

rt.sd.factor

numeric. default = 3. clusters within rt.sd.factor * ramclustObj$rtsd (cluster retention time standard deviation) are considered for merging.

Details

exports files to a directory called 'spectra'. If one.file = FALSE, a new directory 'spectra/msp' is created to hold the individual msp files. if do.findman has been run, spectra are written as ms2 spectra, else as ms1.

Value

new ramclustR object, with (generally) fewer clusters than the input ramclustR object.

Author(s)

Corey Broeckling


cbroeckl/RAMClustR documentation built on March 23, 2024, 6:45 p.m.