Description Usage Arguments Value Author(s) See Also Examples
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.
1 2 | create_methyl_region(bs_data, prom_region, cpg_density = 1, sd_thresh = 0,
ignore_strand = FALSE, fmin = -1, fmax = 1)
|
bs_data |
|
prom_region |
|
cpg_density |
Optional integer defining the minimum number of CpGs that
have to be in a methylated region. Regions with less than |
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. |
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. |
A methyl_region
object containing the following information:
meth_data
: A list containing methylation data,
where each entry in the list is an L_{i} X 3 dimensional matrix,
where L_{i} denotes the number of CpGs found in region i
. The
columns contain the following information:
1st column: Contains the locations of CpGs relative to TSS. Note that the actual locations are scaled to the (fmin, fmax) region.
2nd column: Contains the total reads of each CpG in the corresponding location.
3rd column: Contains the methylated reads each CpG in the corresponding location.
prom_ind
: A vector storing the corresponding
promoter indices, so as to map each methylation region with its
corresponding gene promoter.
The lengths of meth_data
and
prom_ind
should be the same.
C.A.Kapourani C.A.Kapourani@ed.ac.uk
preprocess_bs_seq
, create_prom_region
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Load the gene annotation example dataset
ann_data <- annot_data
prom_reg <- create_prom_region(ann_data, upstream=-10000, downstream=10000)
bs_data <- rrbs_data
# Create the meth_region object
meth_regions <- create_methyl_region(bs_data, prom_reg)
# Extract the promoter indices
prom_indices <- meth_regions$prom_ind
# Extract the methylated data list
methylated_data <- meth_regions$meth_data
# Get the 1st methylated region
meth_reg <- methylated_data[[1]]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.