Writes values from input BED files into an in-memory matrix
read_mem_data( files, ref_cpgs, col_list, batch_size = 20, n_threads = 1, zero_based = FALSE, strand_collapse = FALSE, verbose = TRUE, fill = TRUE )
| files | list of strings; file.paths of BED files |
|---|---|
| ref_cpgs | data.table; list of CpG sites in the tab-delimited format of chr-start-end. Must be zero-based genome. |
| col_list | The column index object for the input BED files |
| batch_size | integer; Max number of files to hold in memory at once. Default 20 |
| n_threads | integer; number of threads to use. Default 1. Be-careful - there is a linear increase in memory usage with number of threads. This option is does not work with Windows OS. |
| zero_based | boolean; flag for whether the input data is zero-based or not |
| strand_collapse | boolean; whether to collapse the crick strand into watson strand. Default FALSE |
| verbose | boolean; flag to output messages or not. |
| fill | boolean; flag whether to fill the output matrixes with all CpGs in ref_cpgs. This must be TRUE for HDF5-based experiments. |
matrix of the methylation values for input BED files
Using the generated index for genomic coordinates, creates a NA-based dense matrtix of methylation values for each BED file/sample. Each column contains the meth. values for a single sample.
if (FALSE) { #Do Nothing }