importOptimus: Construct SCE object from Optimus output

Description Usage Arguments Value Examples

View source: R/importOptimus.R

Description

Read the barcodes, features (genes), and matrices from Optimus outputs. Import them as one SingleCellExperiment object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
importOptimus(
  OptimusDirs,
  samples,
  matrixLocation = "call-MergeCountFiles/sparse_counts.npz",
  colIndexLocation = "call-MergeCountFiles/sparse_counts_col_index.npy",
  rowIndexLocation = "call-MergeCountFiles/sparse_counts_row_index.npy",
  cellMetricsLocation = "call-MergeCellMetrics/merged-cell-metrics.csv.gz",
  geneMetricsLocation = "call-MergeGeneMetrics/merged-gene-metrics.csv.gz",
  emptyDropsLocation = "call-RunEmptyDrops/empty_drops_result.csv",
  class = c("Matrix", "matrix"),
  delayedArray = TRUE
)

Arguments

OptimusDirs

A vector of root directories of Optimus output files. The paths should be something like this: /PATH/TO/bb4a2a5e-ff34-41b6-97d2-0c0c0c534530. Each entry in OptimusDirs is considered a sample and should have its own path. Must have the same length as samples.

samples

A vector of user-defined sample names for the sample to be imported. Must have the same length as OptimusDirs.

matrixLocation

Character. It is the intermediate path to the filtered count maxtrix file saved in sparse matrix format (.npz). Default call-MergeCountFiles/sparse_counts.npz which works for optimus_v1.4.0.

colIndexLocation

Character. The intermediate path to the barcode index file. Default call-MergeCountFiles/sparse_counts_col_index.npy.

rowIndexLocation

Character. The intermediate path to the feature (gene) index file. Default call-MergeCountFiles/sparse_counts_row_index.npy.

cellMetricsLocation

Character. It is the intermediate path to the cell metrics file (merged-cell-metrics.csv.gz). Default call-MergeCellMetrics/merged-cell-metrics.csv.gz which works for optimus_v1.4.0.

geneMetricsLocation

Character. It is the intermediate path to the feature (gene) metrics file (merged-gene-metrics.csv.gz). Default call-MergeGeneMetrics/merged-gene-metrics.csv.gz which works for optimus_v1.4.0.

emptyDropsLocation

Character. It is the intermediate path to emptyDrops metrics file (empty_drops_result.csv). Default call-RunEmptyDrops/empty_drops_result.csv which works for optimus_v1.4.0.

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

Value

A SingleCellExperiment object containing the count matrix, the gene annotation, and the cell annotation.

Examples

1
2
3
4
5
6
7
file.path <- system.file("extdata/Optimus_20x1000",
  package = "singleCellTK")
## Not run: 
sce <- importOptimus(OptimusDirs = file.path,
  samples = "Optimus_20x1000")

## End(Not run)

singleCellTK documentation built on Nov. 8, 2020, 5:21 p.m.