Read the barcodes, features (genes), and matrices from Optimus outputs. Import them as one SingleCellExperiment object.
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 = FALSE,
rowNamesDedup = TRUE
)
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
.
A vector of user-defined sample names for the sample to be
imported. Must have the same length as OptimusDirs
.
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.
Character. The intermediate path to the barcode
index file. Default call-MergeCountFiles/sparse_counts_col_index.npy
.
Character. The intermediate path to the feature
(gene) index file. Default
call-MergeCountFiles/sparse_counts_row_index.npy
.
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.
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.
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.
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".
Boolean. Whether to read the expression matrix as
DelayedArray object or not. Default FALSE
.
Boolean. Whether to deduplicate rownames. Default
TRUE
.
A SingleCellExperiment object containing the count matrix, the gene annotation, and the cell annotation.
file.path <- system.file("extdata/Optimus_20x1000",
package = "singleCellTK")
if (FALSE) {
sce <- importOptimus(OptimusDirs = file.path,
samples = "Optimus_20x1000")
}