Create a SingleCellExperiment object from files

importFromFiles(
  assayFile,
  annotFile = NULL,
  featureFile = NULL,
  assayName = "counts",
  inputDataFrames = FALSE,
  class = c("Matrix", "matrix"),
  delayedArray = FALSE,
  annotFileHeader = FALSE,
  annotFileRowName = 1,
  annotFileSep = "\t",
  featureHeader = FALSE,
  featureRowName = 1,
  featureSep = "\t",
  gzipped = "auto",
  rowNamesDedup = TRUE
)

Arguments

assayFile

The path to a file in .mtx, .txt, .csv, .tab, or .tsv format.

annotFile

The path to a text file that contains columns of annotation information for each cell in the assayFile. This file should have the same number of rows as there are columns in the assayFile. If multiple samples are represented in the dataset, this should be denoted by a column called 'sample' within the annotFile.

featureFile

The path to a text file that contains columns of annotation information for each gene in the count matrix. This file should have the same genes in the same order as assayFile. This is optional.

assayName

The name of the assay that you are uploading. The default is "counts".

inputDataFrames

If TRUE, assayFile, annotFile and featureFile should be data.frames object (or its inheritance) instead of file paths. The default is FALSE.

class

Character. The class of the expression matrix stored in the SCE object. Can be one of "Matrix" (as returned by readMM function), or "matrix" (as returned by matrix function). Default "Matrix".

delayedArray

Boolean. Whether to read the expression matrix as DelayedArray object or not. Default FALSE.

annotFileHeader

Whether there's a header (colnames) in the cell annotation file. Default is FALSE.

annotFileRowName

Which column is used as the rownames for the cell annotation file. This should match to the colnames of the assayFile. Default is 1 (first column).

annotFileSep

Separater used for the cell annotation file. Default is "\t".

featureHeader

Whether there's a header (colnames) in the feature annotation file. Default is FALSE.

featureRowName

Which column is used as the rownames for the feature annotation file. This should match to the rownames of the assayFile. Default is 1. (first column).

featureSep

Separater used for the feature annotation file. Default is "\t".

gzipped

Whether the input file is gzipped. Default is "auto" and it will automatically detect whether the file is gzipped. Other options are TRUE or FALSE.

rowNamesDedup

Boolean. Whether to deduplicate rownames. Default TRUE.

Value

a SingleCellExperiment object

Details

Creates a SingleCellExperiment object from a counts file in various formats, and files of cell and feature annotation.