cluster: Cluster data based on mass and retention time

clusterR Documentation

Cluster data based on mass and retention time

Description

Cluster the data using hierarchical clustering with the hclust function. The data are clustered with the normalized recalibrated mass and the normalized aligned retention times.

Usage

cluster(x, errors, method, height, min_size)

Arguments

x

A data.table output from the recalibrate_mass function.

errors

A list output from the calc_error function. The first element of the list contains the standard deviation and median of the mass measurement error for each data set. The second element is the standard deviation of the mass measurement error across all data sets. The third element is the standard deviation of the retention time in seconds across all data sets.

method

A character string indicating what agglomeration method should be used in the hclust function. See hclust for more details.

height

An number specifying the height at which the tree created by the hclust function should be cut. See hclust for more details.

min_size

An integer value indicating the minimum number of points a cluster must have. All clusters with fewer members than min_size will be reclassified as "noise" points. The cluster assignment for noise points is 0.

Value

A data.table with the cluster assignment for each observation.

Author(s)

Evan A Martin


evanamartin/TopPICR documentation built on Dec. 9, 2022, 8:05 p.m.