This function builds an ExpressionSet, Seurat, or SingleCellExperiment object with scRNA data

scprep_build(
  sample_paths = NULL,
  input_data = FALSE,
  annotation = NULL,
  file_type = "h5",
  gene_id = "symbol",
  vdj = FALSE,
  cite = FALSE,
  cite_ignore = TRUE,
  atac = FALSE,
  atac_ignore = TRUE,
  output_type = "eset",
  verbose = TRUE
)

Arguments

sample_paths

Character vector of paths to filtered_feature_bc_matrix.h5 for all samples in project

input_data

Logical; Default is FALSE to ignore; if TRUE, input_data should be a list of pre-loaded count matrices (instead of file paths) - IMPORTANT: if you use this form of input, it will override 'sample_paths' argument! If the 'Sample_ID' column in annotation.csv does not match the names of the elements of this list, the 'annotation' input will be ignored and your metadata will only contain the names of the elements in this list (if the list elements are NOT named, they will be give numeric IDs corresponding to order of the list)

annotation

Matrix of project-specific annotation.csv

file_type

File type ("h5" or "mtx"); if "mtx", the following files must be in sample directory: matrix.mtx, barcodes.tsv, genes.tsv or features.tsv

gene_id

Gene ID type ("ensembl" or "symbol")

vdj

Data is multimodal RNA & VDJ

cite

Data is multimodal RNA & Protein

cite_ignore

FALSE to ignore; Default is TRUE, ignore the "Antibody Capture" slot in the h5 file input and only extract/store the "Gene Expression" slot; This is only relevant if your data contains both RNA and protein modalities and you want to ignore the protein modality

atac

Data is multimodal RNA & ATAC

atac_ignore

FALSE to ignore; Default is TRUE, ignore the "ATAC" slot in the h5 file input and only extract/store the "Gene Expression" slot; This is only relevant if your data contains both RNA and ATAC modalities and you want to ignore the ATAC modality

output_type

Output object type ("eset" (ExpressionSet), "seurat", or "sce" (SingleCellExperiment))

verbose

Logical; if TRUE (default), print progress messages; if FALSE, suppress output

Value

ExpressionSet, Seurat, or SingleCellExperiment object containing expression data for all samples & annotation

Examples

if (FALSE) {
# Build ExpressionSet (default)
dataset <- scprep_build(sample_paths=sample_paths, input_data=FALSE, annotation=annotation, 
                             file_type="h5", gene_id="symbol", vdj=FALSE, 
                             cite=FALSE, atac=FALSE)
}