read_mem_data: Writes values from input BED files into an in-memory 'matrix'

Description Usage Arguments Details Value Examples

Description

Writes values from input BED files into an in-memory matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
read_mem_data(
  files,
  ref_cpgs,
  col_list,
  batch_size = 20,
  n_threads = 1,
  zero_based = FALSE,
  strand_collapse = FALSE,
  verbose = TRUE,
  fill = TRUE
)

Arguments

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.

Details

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.

Value

matrix of the methylation values for input BED files

Examples

1
2
3
4
## Not run: 
#Do Nothing

## End(Not run)

CompEpigen/scMethrix documentation built on Nov. 6, 2021, 3:09 p.m.