binarise_files {Melissa} | R Documentation

## Binarise CpG sites

### 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

    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

    ## Not run:
    # Met directory
    met_dir <- "name_of_met_dir"

    binarise_files(met_dir)

    ## End(Not run)

[Package Melissa version 1.10.0 Index]