knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

MethReg

codecov license-blue)

MethReg can be used to generate testable hypothesis on the synergistic interaction of DMRs and TFs in gene regulation.

MethReg can be used either to evaluate regulatory potentials of candidate regions or to search for methylation coupled TF regulatory processes in the entire genome.

Installation

You can install the MethReg from Bioconductor with:

BiocManager::install("MethReg")

Example

This is a basic example which shows you how to use the package:

library(MethReg)
#---------------------------------------
# Data input
#---------------------------------------
# 1) Gene expression matrix
# 2) DNA methylation
# With same column names
data("dna.met.chr21")
data("gene.exp.chr21.log2")
all(colnames(dna.met.chr21) == colnames(gene.exp.chr21.log2))

# Since we are working with regions we need to map our 450k array to regions
dna.met.chr21 <- make_dnam_se(dna.met.chr21)
#---------------------------------------
# Mapping regions
#---------------------------------------
# For each region get target gene and predicted TF biding to the regions
# get_triplet incorporates two other functions:
# 1) get_region_target_gene
# 2) get_tf_in_region
triplet <- create_triplet_distance_based(
    region = rownames(dna.met.chr21),
    motif.search.window.size = 50,
    motif.search.p.cutoff = 10^-3,
    target.method = "genes.promoter.overlap",
    genome = "hg19",
    cores = 1
)
#---------------------------------------
# Evaluate two models: 
#---------------------------------------
# 1) target gene ~ TF + DNAm + TF * DNAm
# 2) target gene ~ TF + DNAm_group + TF * DNAm_group 
# where DNAm_group is a binary indicator if the sample belongs to: Q4 or Q1
results <- interaction_model(
    triplet = triplet, 
    dnam = dna.met.chr21,
    exp = gene.exp.chr21.log2
)
head(results)

Session information

sessionInfo()


TransBioInfoLab/MethReg documentation built on July 28, 2023, 9:17 p.m.