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

readQFeatures(table, ecol, fnames, ..., name = NULL)

readSummarizedExperiment(table, ecol, fnames, ...)

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 expression 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.

fnames

An optional character(1) or numeric(1) indicating the column to be used as feature names.

...

Further arguments that can be passed on to read.csv except stringsAsFactors, which is always FALSE.

name

An character(1) to name assay in the QFeatures object. If not set, features is used.

Value

An instance of class QFeatures or SummarizedExperiment.

Functions

  • readQFeatures: See description.

  • readSummarizedExperiment: Convert tabular data from a spreadsheet or a data.frame into a SummarizedExperiment object.

See also

The QFeatures class for an example on how to use readQFeatures and how to further manipulate the resulting data.

Author

Laurent Gatto

Examples


## Load a data.frame with PSM-level data
data(hlpsms)

## Create the QFeatures object
fts2 <- readQFeatures(hlpsms, ecol = 1:10, name = "psms")
fts2
#> An instance of class QFeatures containing 1 assays:
#>  [1] psms: SummarizedExperiment with 3010 rows and 10 columns