create_pcg: Combines clusters based on mass and retention time

create_pcgR Documentation

Combines clusters based on mass and retention time

Description

Compares the centroid of each cluster within a gene and combines the two clusters if the centroids fall within the specified threshold. The clusters are combined by creating a new cluster membership variable pcGroup.

Usage

create_pcg(x, errors, n_mme_sd = 3, n_Da = 4, n_rt_sd = 3)

Arguments

x

A data.table output from the cluster 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.

n_mme_sd

The number of standard deviations used to create an envelope around a cluster's centroid in mass space. The standard deviation is in ppm. This threshold will be used to determine if two clusters will be combined.

n_Da

The number of Daltons used to create an envelope around a cluster's centroid in mass space. Any cluster whose centroid falls within this envelope will be included in the pool of clusters that could be combined. This value is used to account for isotopic error and is separate from n_mme_sd.

n_rt_sd

The number of standard deviations used to create an envelope around a cluster's centroid in retention time space. Any cluster whose centroid falls within this envelope will be included in the pool of clusters that could be combined.

Value

A data.table with the updated cluster assignment for each gene/cluster combination.

Author(s)

Evan A Martin


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