Read_CellBender_h5_Multi_Directory {scCustomize} | R Documentation |
Load CellBender h5 matrices (corrected) from multiple directories
Description
Extract sparse matrix with corrected counts from CellBender h5 output file across multiple sample subdirectories.
Usage
Read_CellBender_h5_Multi_Directory(
base_path,
secondary_path = NULL,
filtered_h5 = TRUE,
custom_name = NULL,
sample_list = NULL,
sample_names = NULL,
h5_group_name = NULL,
feature_slot_name = "features",
replace_suffix = FALSE,
new_suffix_list = NULL,
parallel = FALSE,
num_cores = NULL,
merge = FALSE,
...
)
Arguments
base_path |
path to the parent directory which contains all of the subdirectories of interest. |
secondary_path |
path from the parent directory to count matrix files for each sample. |
filtered_h5 |
logical (default TRUE). Will set the shared file name suffix |
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 directory 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". |
replace_suffix |
logical (default FALSE). Whether or not to replace the barcode suffixes of matrices
using |
new_suffix_list |
a vector of new suffixes to replace existing suffixes if |
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_Directory(base_path = base_path)
## End(Not run)