Read_CellBender_h5_Multi_File {scCustomize} | R Documentation |
Load CellBender h5 matrices (corrected) from multiple files
Description
Extract sparse matrix with corrected counts from CellBender h5 output file across multiple samples within the same directory.
Usage
Read_CellBender_h5_Multi_File(
data_dir = NULL,
filtered_h5 = TRUE,
custom_name = NULL,
sample_list = NULL,
sample_names = NULL,
h5_group_name = NULL,
feature_slot_name = "features",
parallel = FALSE,
num_cores = NULL,
merge = FALSE,
...
)
Arguments
data_dir |
Directory containing the .h5 files output by CellBender. |
filtered_h5 |
logical (default TRUE). Will set the shared file name suffix if |
custom_name |
if file name was customized in CellBender then this parameter should contain the portion of file name that is shared across all samples. Must included the ".h5" extension as well. |
sample_list |
a vector of sample names if only specific samples are desired. If |
sample_names |
a set of sample names to use for each sample entry in returned list. If |
h5_group_name |
Name of the group within H5 file that contains count data. This is only
required if H5 file contains multiple subgroups and non-default names. Default is |
feature_slot_name |
Name of the slot contain feature names/ids. Must be one of: "features"(Cell Ranger v3+) or "genes" (Cell Ranger v1/v2 or STARsolo). Default is "features". |
parallel |
logical (default FALSE) whether or not to use multi core processing to read in matrices |
num_cores |
how many cores to use for parallel processing. |
merge |
logical (default FALSE) whether or not to merge samples into a single matrix or return
list of matrices. If TRUE each sample entry in list will have cell barcode prefix added. The prefix
will be taken from |
... |
Extra parameters passed to |
Value
list of sparse matrices
Examples
## Not run:
base_path <- 'path/to/data/directory'
mat_list <- Read_CellBender_h5_Multi_File(data_dir = base_path)
## End(Not run)