Description Usage Arguments See Also Examples
Imports either time-of-flight (TOF) or intensity values from a mass spectrum written in Ciphergen's XML format. The corresponding m/z data are either imported directly from the file or calculated (to a specified precision) based on mass calibration factors extracted from the XML file.
1 | msImportCiphergenXML(x, tof=FALSE, mz.calc=TRUE, digits=3)
|
x |
A character string defining the path to the Ciphergen XML file. |
digits |
An integer defining the precision of the m/z if
|
mz.calc |
A logical value. If |
tof |
A logical value. If |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## create a faux Ciphergen file with basic MS data
## information
xmlFileName <- file.path(getwd(), "ciphergen_example.xml")
cat(paste(
"<spectrum>",
"<processingParameters>",
"<massCalibration>",
"<massCalibrationA>264659356.3912175</massCalibrationA>",
"<massCalibrationB>0.0005517310499463604</massCalibrationB>",
"<massCalibrationT0>2.053450999111159e-007</massCalibrationT0>",
"</massCalibration>",
"</processingParameters>",
"<tofData>",
"<tofDataNumSamples>5</tofDataNumSamples>",
"<tofDataTimeZero>0</tofDataTimeZero>",
"<tofDataSamples>2172 2163 2114 2061 2107</tofDataSamples>",
"</tofData>",
"<acquisitionInfo>",
"<setting>",
"<ionSourceVoltage>20000</ionSourceVoltage>",
"<digitizerRate>2.5e+008</digitizerRate>",
"</setting>",
"</acquisitionInfo>",
"<processedData>",
"<processedDataSamples>",
"10.811,4.4363 10.820,4.4179 10.828,4.3178",
"10.837,4.2096 10.845,4.3035",
"</processedDataSamples>",
"</processedData>",
"</spectrum>",
sep="\n"), file=xmlFileName)
## read in the data, comparing calculated and
## preset m/z values
msImportCiphergenXML(xmlFileName, mz.calc=TRUE, digits=3)$mz
msImportCiphergenXML(xmlFileName, mz.calc=FALSE)$mz
## read in TOF and then the intensity data
msImportCiphergenXML(xmlFileName, tof=TRUE, digits=3)$tof
msImportCiphergenXML(xmlFileName, tof=FALSE)$intensity
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.