This function is a utility wrapper for SummarizedExperiment that provides automatic subsetting for row and column data, as well as automatic handling of transgenes and spike-ins. Additionally, it improves upon the standard constructor by slotting useful session information into the metadata slot:

makeSingleCellExperiment(assays, rowRanges, colData, metadata,
  transgeneNames = NULL, spikeNames = NULL)

Arguments

assays

list. Count matrices, which must have matching dimensions. Counts can be passed in as either a dense matrix (matrix) or sparse matrix (sparseMatrix).

rowRanges

GRanges. Genomic ranges (e.g. genome annotations). Metadata describing the assay rows.

colData

DataFrame. Metadata describing the assay columns. For bulk RNA-seq, this data describes the samples. For single-cell RNA-seq, this data describes the cells.

metadata

list. Metadata.

transgeneNames

character. Vector indicating which assay rows denote transgenes (e.g. EGFP, TDTOMATO).

spikeNames

character. Vector indicating which assay rows denote spike-in sequences (e.g. ERCCs).

Value

SingleCellExperiment.

Details

  • date: Today's date, returned from Sys.Date.

  • wd: Working directory, returned from getwd.

  • sessionInfo: sessioninfo::session_info() return.

See also

Examples

data(sce, package = "acidtest") object <- sce x <- makeSingleCellExperiment( assays = SummarizedExperiment::assays(object), rowRanges = SummarizedExperiment::rowRanges(object), colData = SummarizedExperiment::colData(object), metadata = S4Vectors::metadata(object) ) print(x)
#> class: SingleCellExperiment #> dim: 500 100 #> metadata(3): date wd sessionInfo #> assays(1): counts #> rownames(500): gene1 gene10 ... gene98 gene99 #> rowData names(5): geneID geneName geneBiotype broadClass entrezID #> colnames(100): cell001 cell002 ... cell099 cell100 #> colData names(2): expLibSize sampleID #> reducedDimNames(0): #> spikeNames(0):