ramclustR: ramclustR

Description Usage Arguments Details Value Author(s) References

View source: R/ramclustR.R

Description

Main clustering function for grouping features based on their analytical behavior.

Usage

1
2
3
4
5
6
7
8
ramclustR(xcmsObj = NULL, ms = NULL, idmsms = NULL,
  taglocation = "filepaths", MStag = NULL, idMSMStag = NULL,
  featdelim = "_", mzpos = 1, timepos = 2, st = NULL, sr = NULL,
  maxt = NULL, deepSplit = FALSE, blocksize = 2000, mult = 5,
  hmax = NULL, sampNameCol = 1, collapse = TRUE, usePheno = TRUE,
  mspout = TRUE, ExpDes = NULL, normalize = "TIC", minModuleSize = 2,
  linkage = "average", mzdec = 4, cor.method = "pearson",
  fftempdir = NULL)

Arguments

xcmsObj

xcmsObject: containing grouped feature data for clustering by ramclustR

ms

filepath: optional csv input. Features as columns, rows as samples. Column header mz_rt

idmsms

filepath: optional idMSMS / MSe csv data. same dim and names as ms required

taglocation

character: "filepaths" by default, "phenoData[,1]" is another option. referse to xcms slot

idMSMStag

character: character string in 'taglocation' to designat idMSMS / MSe files e.g. "02.cdf"

featdelim

character: how feature mz and rt are delimited in csv import column header e.g. ="-"

timepos

integer: which position in delimited column header represents the retention time (csv only)

st

numeric: sigma t - time similarity decay value

sr

numeric: sigma r - correlational similarity decay value

maxt

numeric: maximum time difference to calculate retention similarity for - all values beyond this are assigned similarity of zero

deepSplit

logical: controls how agressively the HCA tree is cut - see ?cutreeDynamicTree

blocksize

integer: number of features (scans?) processed in one block =1000,

mult

numeric: internal value, can be used to influence processing speed/ram usage

hmax

numeric: precut the tree at this height, default 0.3 - see ?cutreeDynamicTree

sampNameCol

integer: which column from the csv file contains sample names?

collapse

logical: reduce feature intensities to spectrum intensities?

usePheno

logical: tranfer phenotype data from XCMS object to SpecAbund dataset?

mspout

logical: write msp formatted specta to file?

ExpDes

either an R object created by R ExpDes object: data used for record keeping and labelling msp spectral output

normalize

character: either "none", "TIC", or "quantile" normalization of feature intensities

minModuleSize

integer: how many features must be part of a cluster to be returned? default = 2

linkage

character: heirarchical clustering linkage method - see ?hclust

mzdec

integer: number of decimal places used in printing m/z values

cor.method

character: which correlational method used to calculate 'r' - see ?cor

fftempdir

valid path: if there are file size limitations on the default ff pacakge temp directory - getOptions('fftempdir') - you can change the directory used as the fftempdir with this option.

Details

Main clustering function output - see citation for algorithm description of vignette('RAMClustR') for a walk through

Value

$featclus: integer vector of cluster membership for each feature

$frt: feature retention time, in whatever units were fed in (xcms uses seconds, by default)

$fmz: feature retention time, reported in number of decimal points selected in ramclustR function

$xcmsOrd: the original XCMS (or csv) feature order for cross referencing, if need be

$clrt: cluster retention time

$clrtsd: retention time standard deviation of all the features that comprise that cluster

$nfeat: number of features in the cluster

$nsing: number of 'singletons' - that is the number of features which clustered with no other feature

$ExpDes: the experimental design object used when running ramclustR. List of two dataframes.

$cmpd: compound name. C#### are assigned in order of output by dynamicTreeCut. Compound with the most features is classified as C0001...

$ann: annotation. By default, annotation names are identical to 'cmpd' names. This slot is a placeholder for when annotations are provided

$MSdata: the MSdataset provided by either xcms or csv input

$MSMSdata: the (optional) MSe/idMSMS dataset provided be either xcms or csv input

$SpecAbund: the cluster intensities after collapsing features to clusters

$SpecAbundAve: the cluster intensities after averaging all samples with identical sample names

- 'spectra' directory is created in the working directory. In this directory a .msp is (optionally) created, which contains the spectra for all compounds in the dataset following clustering. if MSe/idMSMS data are provided, they are listed witht he same compound name as the MS spectrum, with the collision energy provided in the ExpDes object provided to distinguish low from high CE spectra.

Author(s)

Corey Broeckling

References

Broeckling CD, Afsar FA, Neumann S, Ben-Hur A, Prenni JE. RAMClust: a novel feature clustering method enables spectral-matching-based annotation for metabolomics data. Anal Chem. 2014 Jul 15;86(14):6812-7. doi: 10.1021/ac501530d. Epub 2014 Jun 26. PubMed PMID: 24927477.

Broeckling CD, Ganna A, Layer M, Brown K, Sutton B, Ingelsson E, Peers G, Prenni JE. Enabling Efficient and Confident Annotation of LC-MS Metabolomics Data through MS1 Spectrum and Time Prediction. Anal Chem. 2016 Sep 20;88(18):9226-34. doi: 10.1021/acs.analchem.6b02479. Epub 2016 Sep 8. PubMed PMID: 7560453.


sneumann/RAMClustR documentation built on May 30, 2019, 5:05 a.m.