Enables easy merge of a list of sparse matrices
Merge_Sparse_Data_All(
matrix_list,
add_cell_ids = NULL,
prefix = TRUE,
cell_id_delimiter = "_"
)
list of matrices to merge.
a vector of sample ids to add as prefix to cell barcode during merge.
logical. Whether add_cell_ids
should be added as prefix to current cell barcodes/names
or as suffix to current cell barcodes/names. Default is TRUE, add as prefix.
The delimiter to use when adding cell id prefix/suffix. Default is "_".
A sparse Matrix
Original function is part of LIGER package https://github.com/welch-lab/liger/blob/master/R/mergeObject.R (License: GPL-3). Function was modified for use in scCustomize (add progress bar, prefix vs. suffix, and delimiter options).
if (FALSE) {
data_list <- Read10X_GEO(...)
merged <- Merge_Sparse_Data_All(matrix_list = data_list, add_cell_ids = names(data_list),
prefix = TRUE, cell_id_delimiter = "_")
}