create_region_object: Create genomic region data

Description Usage Arguments Value Author(s) See Also Examples

View source: R/process_data.R

Description

create_region_object creates genomic regions (e.g. forms methylation regions data) using as input methylation and annotation data with genomic regions of interest.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
create_region_object(
  met_dt,
  anno_dt,
  cov = 5,
  sd_thresh = 0.1,
  ignore_strand = TRUE,
  filter_empty_region = TRUE,
  fmin = -1,
  fmax = 1
)

Arguments

met_dt

A GRanges object with methylation data, whose format should be similar to read_met function.

anno_dt

A GRanges object with annotation data, whose format should be similar to read_anno.

cov

Integer defining the minimum coverage of CpGs that each region must contain.

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 variability.

ignore_strand

Logical, whether or not to ignore strand information.

filter_empty_region

Logical, whether to discard genomic regions that have no CpG coverage or do not pass filtering options.

fmin

Minimum range value for location scaling. Under this version, it should be left to its default value -1.

fmax

Maximum range value for location scaling. Under this version, it should be left to its default value 1.

Value

A list object containing the two elements:

Note: The lengths of met and anno should match.

Author(s)

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

See Also

read_met, read_anno

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Download the files and change the working directory to that location
met_dt <- read_met("name_of_met_file")
anno_dt <- read_anno("name_of_anno_file")

obj <- create_region_object(met_dt, anno_dt)

# Extract methylation regions
met <- obj$met

## End(Not run)

BPRMeth documentation built on Nov. 8, 2020, 5:54 p.m.