Convert tabular quantitative MS data and metadata from a spreadsheet or a data.frame into a QFeatures object containing SingleCellExperiment objects.

  suffix = NULL,
  removeEmptyCols = FALSE,
  verbose = TRUE,



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 data.frame or any object that can be coerced to a data.frame. colData is expected to contains all the sample meta information. Required fields are the acquisition batch (given by batchCol) and the acquisition channel within the batch (e.g. TMT channel, given by channelCol). Additional fields (e.g. sample type, acquisition date,...) are allowed and will be stored as sample meta data.


A numeric(1) or character(1) pointing to the column of featureData and colData that contain the batch names. Make sure that the column name in both table are either identical and syntactically valid (if you supply a character) or have the same index (if you supply a numeric). Note that characters can be converted to syntactically valid names using make.names


A numeric(1) or character(1) pointing to the column of colData that contains the column names of the quantitative data in featureData (see Example).


A character() giving the suffix of the column names in each assay. The length of the vector should equal the number of quantification channels and should contain unique character elements. If NULL, the names of the quantification columns in featureData are taken as suffix.


A logical(1). If true, the function will remove in each batch the columns that contain only missing values.


A logical(1) indicating whether the progress of the data reading and formatting should be printed to the console. Default is TRUE.


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


An instance of class QFeatures. The expression data of each batch is stored in a separate assay as a SingleCellExperiment object.


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


Laurent Gatto, Christophe Vanderaa


## Load an example table containing MaxQuant output

## Load the (user-generated) annotation table

## Format the tables into a QFeatures object
readSCP(featureData = mqScpData,
        colData = sampleAnnotation,
        batchCol = "Raw.file",
        channelCol = "Channel")
#> Loading data as a 'SingleCellExperiment' object
#> Splitting data based on 'Raw.file'
#> Formatting sample metadata (colData)
#> Formatting data as a 'QFeatures' object
#> An instance of class QFeatures containing 4 assays:
#>  [1] 190222S_LCA9_X_FP94BM: SingleCellExperiment with 395 rows and 16 columns 
#>  [2] 190321S_LCA10_X_FP97AG: SingleCellExperiment with 487 rows and 16 columns 
#>  [3] 190321S_LCA10_X_FP97_blank_01: SingleCellExperiment with 109 rows and 16 columns 
#>  [4] 190914S_LCB3_X_16plex_Set_21: SingleCellExperiment with 370 rows and 16 columns