Convert tabular data from a spreadsheet or a data.frame
into a
SingleCellExperiment
object.
readSingleCellExperiment(table, ecol, fnames, ...)
File or object holding the quantitative data. Can be
either a character(1)
with the path to a text-based
spreadsheet (comma-separated values by default, but see ...
)
or an object that can be coerced to a data.frame
. It is
advised not to encode characters as factors.
A numeric
indicating the indices of the columns to
be used as assay values. Can also be a character
indicating the names of the columns. Caution must be taken if
the column names are composed of special characters like (
or -
that will be converted to a .
by the read.csv
function. If ecol
does not match, the error message will
display the column names as seen by the read.csv
function.
An optional character(1)
or numeric(1)
indicating the column to be used as row names.
Further arguments that can be passed on to read.csv
except stringsAsFactors
, which is always FALSE
.
An instance of class SingleCellExperiment.
The SingleCellExperiment
class is built on top of the
RangedSummarizedExperiment
class. This means that some column names
are forbidden in the rowData
. Avoid using the following names:
seqnames
, ranges
, strand
, start
, end
,
width
, element
The code relies on QFeatures::readSummarizedExperiment.