Description Usage Arguments Details Value Examples
Import mass spectrometry imaging data in either CSV or triplet format. CSV file is for example exported from MSiReader using the Intensity export function or from other software. For CSV file, column headers should be ion masses, and table values should be all numeric or there will be an error.
1 2 3 4 5 6 |
csv |
filename; CSV-formatted table of intensities arranged by peak masses (columns, with column headers) and pixel spots (rows, with row names) |
sep |
character; column separator in CSV file (default: ",") |
rows |
filename; File of row numbers, 0-based (see note on triplet representation above), one per line |
cols |
filename; File of column numbers, 0-based, one per line |
vals |
filename; File of intensity values, one per line |
peaks |
filename; File of peak mass values, one per line. Order in list should correspond to the column numbers given to argument cols |
spots |
filename; File of pixel spot names, one per line. Order in list should correspond to the row numbers given to argument rows |
remove.zeroes |
logical; remove columns where all values are zero? (default: TRUE) |
header |
logical; (default: TRUE) |
check.names |
logical; (default: FALSE) |
row.names |
numeric; column in import table specifying row names (default: 1) |
reformat.large.csv |
filename prefix; If this is not null, then the CSV
file specified to option |
crlf |
logical; Whether input CSV file uses CRLF line endings (Windows/ DOS format). |
script.path |
Path to |
... |
Parameters to be passed to read.csv() |
Alternatively the data can be in triplet form, with separate lists of row, column, and intensity values. Two additional lists hold the peak mass values and the pixel spot names. This is useful for importing very large but sparse data matrices. If a filename is specified to option csv, then options row, cols, vals, peaks, and spots are ignored.
It is also possible to convert a CSV file into triplet form before import, by
calling the Perl script msimunging.pl
, included in the package source,
either outside of R, or during the import (see description of parameter
reformat.large.csv
below). The conversion may take a long time, and
hence it may be more practical to convert large CSV files first before
interactive data analysis.
Object of class msimat
1 2 3 | d <- msimat(csv=system.file("extdata","msi.csv",package="mass2adduct"),sep=";")
print(d) # Summary of contents
plot(d) # Mass spectrum of total intensity per peak
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.