create_methyl_region: Create methylation regions for each gene promoter.

Description Usage Arguments Value Author(s) See Also Examples

Description

create_methyl_region creates methylation regions using BS-Seq and annotated gene promoter regions. BS-Seq data give information for the methylation of CpGs individually, and annotated data are used to locate the TSS of each gene and its promoter region.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
create_methyl_region(bs_data, prom_region, cpg_density = 10,
  sd_thresh = 0.1, ignore_strand = TRUE, is_single_cell = FALSE,
  fmin = -1, fmax = 1)

create_methyl_region_array(bs_data, prom_region, cpg_density = 10,
  sd_thresh = 0.1, ignore_strand = TRUE, is_single_cell = FALSE,
  fmin = -1, fmax = 1)

create_methyl_region_saar_levels(bs_data, prom_region, cpg_density = 10,
  sd_thresh = 0.1, ignore_strand = TRUE, is_single_cell = FALSE,
  fmin = -1, fmax = 1)

create_methyl_region_saar_eff(bs_data, prom_region, cpg_density = 10,
  sd_thresh = 0.1, ignore_strand = TRUE, is_single_cell = FALSE,
  fmin = -1, fmax = 1)

Arguments

bs_data

GRanges object containing the BS-Seq data. The GRanges object should also have two additional metadata columns named total_reads and meth_reads. A GRanges object used in this function can be the output of read_bs_encode_haib or its wrapper function preprocess_bs_seq.

prom_region

GRanges object containing promoter regions, i.e. N bp upstream and M bp downstream of TSS location. The GRanges object should also have one additional metadata column named tss. A GRanges object used in this function can be the output of create_prom_region.

cpg_density

Optional integer defining the minimum number of CpGs that have to be in a methylated region. Regions with less than n CpGs are discarded.

sd_thresh

Optional numeric defining the minimum standard deviation of the methylation change in a region. This is used to filter regions with no methylation change.

ignore_strand

Logical, whether or not to ignore strand information.

is_single_cell

Logical, if we work with single cell data, then we keep only the information of methylated or not for each CpG location.

fmin

Optional minimum range value for region location scaling. Under this version, this parameter should be left to its default value.

fmax

Optional maximum range value for region location scaling. Under this version, this parameter should be left to its default value.

Value

A methyl_region object containing the following information:

The lengths of meth_data and prom_ind should be the same.

Author(s)

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

See Also

preprocess_bs_seq, create_prom_region

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Obtain the path to the BS file and then read it
bs_file <- system.file("extdata", "rrbs.bed", package = "BPRMeth")
bs_data <- read_bs_encode_haib(bs_file)

# Create promoter regions
rnaseq_file <- system.file("extdata", "rnaseq.bed", package = "BPRMeth")
annot_data <- read_rna_encode_caltech(rnaseq_file)
prom_region <- create_prom_region(annot_data)

# Finally, create methylation regions
meth_region <- create_methyl_region(bs_data, prom_region)

andreaskapou/BPRMeth-devel documentation built on May 12, 2019, 3:32 a.m.