binarise_files: Binarise CpG sites

Description Usage Arguments Value Author(s) See Also Examples

View source: R/process_data.R

Description

Script for binarising CpG sites and formatting the coverage file so it can be directly used from the BPRMeth package. The format of each file is the following: <chr> <start> <met_level>, where met_level can be either 0 or 1. To read compressed files, e.g ending in .gz or .bz2, the R.utils package needs to be installed.

Usage

1
binarise_files(indir, outdir = NULL, format = 1, no_cores = NULL)

Arguments

indir

Directory containing the coverage files, output from Bismark.

outdir

Directory to store the output files for each cell with exactly the same name. If NULL, then a directory called 'binarised' inside 'indir' will be create by default.

format

Integer, denoting the format of coverage file. When set to '1', the coverage file format is assumed to be: "<chr> <start> <end> <met_prcg> <met_reads> <unmet_reads>". When set to '2', then the format is assumed to be: "<chr> <start> <met_prcg> <met_reads> <unmet_reads>".

no_cores

Number of cores to use for parallel processing. If NULL, no parallel processing is used.

Value

No value is returned, the binarised data are stored in the outdir.

Author(s)

C.A.Kapourani C.A.Kapourani@ed.ac.uk

See Also

create_melissa_data_obj, melissa, filter_regions

Examples

1
2
3
4
5
6
7
## Not run: 
# Met directory
met_dir <- "name_of_met_dir"

binarise_files(met_dir)

## End(Not run)

andreaskapou/Melissa documentation built on June 12, 2020, 5:54 p.m.