read_bs_encode_haib {BPRMeth} | R Documentation

## (DEPRECATED) Read ENCODE HAIB bed formatted BS-Seq file

### Description

(DEPRECATED) `read_bs_encode_haib` reads a file containing methylation data from BS-Seq experiments using the `scan` function. The BS-Seq file should be in ENCODE HAIB `bed` format. Read the Important section below on when to use this function.

### Usage

    read_bs_encode_haib(file, chr_discarded = NULL, is_GRanges = TRUE)

### Arguments

`file` | The name of the file to read data values from.
`chr_discarded` | A vector with chromosome names to be discarded.
`is_GRanges` | Logical: if TRUE a GRanges object is returned, otherwise a data.frame object is returned.

### Value

A `GRanges` object if `is_GRanges` is TRUE, otherwise a `data.table` object.

The GRanges object contains two additional metadata columns:

- `total_reads`: total reads mapped to each genomic location.

- `meth_reads`: methylated reads mapped to each genomic location.

These columns can be accessed as follows: `granges_object$total_reads`

### Important

Unless you want to create a different workflow when processing the BS-Seq data, you should NOT call this function, since this is a helper function. Instead you should call the `preprocess_bs_seq` function.

### Author(s)

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

### See Also

`pool_bs_seq_rep`, `preprocess_bs_seq`

### Examples

    # Obtain the path to the file and then read it
    bs_file <- system.file("extdata", "rrbs.bed", package = "BPRMeth")
    bs_data <- read_bs_encode_haib(bs_file)

[Package BPRMeth version 1.12.0 Index]