msc.peaks.read.csv & msc.peaks.write.csv {caMassClass} | R Documentation |
Functions to read and write CSV (comma separated values) text files containing peaks in the format used by Ciphergen's peak file.
X = msc.peaks.read.csv(fname, mzXML.record=FALSE) msc.peaks.write.csv(X, fname)
X |
Peak information. A data-frame in the same format as returned by
msc.peaks.find , containing five components:
|
fname |
either a character string naming a file or a connection. |
mzXML.record |
should mzXML record be created to store mata-data (input file names)? |
Function msc.peaks.read.csv
returns peak information data frame. See
argument X
above. If mzXML.record
was set to true than mzXML
record with input file names will be attached to X
as "mzXML
"
attribute.
Function msc.peaks.write.csv
does not return anything.
Jarek Tuszynski (SAIC) jaroslaw.w.tuszynski@saic.com
msc.peaks.find
and msc.peaks.align
# load "Data_IMAC.Rdata" file containing raw MS spectra 'X' if (!file.exists("Data_IMAC.Rdata")) example("msc.project.read") load("Data_IMAC.Rdata") # Find Peaks and save them Peaks = msc.peaks.find(X) # create peak data msc.peaks.write.csv(Peaks, "peaks.csv") Pks = msc.peaks.read.csv("peaks.csv", mzXML.record=TRUE) stopifnot(Pks==Peaks) mzXML = attr(Pks,"mzXML") strsplit(mzXML$parentFile, '\n') # show mzXML$parentFile record # Suggestion: inspect 'peaks.csv' using any text editor file.remove("peaks.csv")