mergeSparseAll {rliger} | R Documentation |
Merge matrices while keeping the union of rows
Description
mergeSparseAll
takes in a list of DGEs, with genes as
rows and cells as columns, and merges them into a single DGE. Also adds
libraryNames
to colnames from each DGE if expected to be overlap
(common with 10X barcodes). Values in rawData
or normData
slot of a ligerDataset object can be processed with this.
For a list of dense matrices, usually the values in scaleData
slot of
a ligerDataset object, please use mergeDenseAll
which
works in the same way.
Usage
mergeSparseAll(
datalist,
libraryNames = NULL,
mode = c("union", "intersection")
)
mergeDenseAll(datalist, libraryNames = NULL)
Arguments
datalist |
List of dgCMatrix for |
libraryNames |
Character vector to be added as the prefix for the
barcodes in each matrix in |
mode |
Whether to take the |
Value
dgCMatrix or matrix with all barcodes in datalist
as columns
and the union of genes in datalist
as rows.
Examples
rawDataList <- getMatrix(pbmc, "rawData")
merged <- mergeSparseAll(rawDataList, libraryNames = names(pbmc))