readSingleCellExperiment: Read SingleCellExperiment from tabular data

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/readSCP.R

Description

Convert tabular data from a spreadsheet or a data.frame into a SingleCellExperiment object.

Usage

1

Arguments

table

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.

ecol

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 dislpay the column names as seen by the read.csv function.

fnames

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.

Value

An instance of class SingleCellExperiment.

Note

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

Author(s)

Laurent Gatto, Christophe Vanderaa

See Also

The code relies on QFeatures::readSummarizedExperiment.

Examples

1
2
3
4
5
6
## Load a data.frame with PSM-level data
data("mqScpData")

## Create the QFeatures object
sce <- readSingleCellExperiment(mqScpData, 
                                grep("RI", colnames(mqScpData)))

scp documentation built on Nov. 8, 2020, 8:20 p.m.