msc.biomarkers.read.csv {caMassClass}R Documentation

Read and Write biomarker matrix in CSV format

Description

Functions to read and write CSV (comma separated values) text files containing biomarkers (aligned peaks) in the format used by Ciphergen's biomarker file, with spectra (samples) as rows, and biomarkers as columns (features).

Usage

  X = msc.biomarkers.read.csv(fname)
  msc.biomarkers.write.csv(fname, X)

Arguments

fname either a character string naming a file or a connection.
X biomarker matrix containing one sample per column and one biomarker per row. Notice that this data is in format which is a transpose of data in CSV file.

Value

Function msc.biomarkers.read.csv returns peak information data frame. See argument X above. Function msc.biomarkers.write.csv does not return anything.

Author(s)

Jarek Tuszynski (SAIC) jaroslaw.w.tuszynski@saic.com

See Also

msc.biomarkers.fill

Examples

  example("msc.peaks.align", verbose=FALSE) # create biomarkers data
  X = Y$Bmrks   #  biomarkers data is stored in variable 'Y$Bmrks'
  msc.biomarkers.write.csv("biomarkers.csv", X)
  Y = msc.biomarkers.read.csv("biomarkers.csv")
  file.remove("biomarkers.csv")
  stopifnot( all(X==Y, na.rm=TRUE) )

[Package caMassClass version 1.1 Index]