-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME.Rmd
More file actions
97 lines (79 loc) · 2.51 KB
/
Copy pathREADME.Rmd
File metadata and controls
97 lines (79 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# MethReg
<!-- badges: start -->
[](https://codecov.io/gl/tiagochst/methtf)
[-blue)]()
<!-- badges: end -->
`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:
``` r
BiocManager::install("MethReg")
```
## Example
This is a basic example which shows you how to use the package:
```{r example, warning = FALSE}
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)
```
```{r map, warning = FALSE, results = "hide"}
#---------------------------------------
# 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
)
```
```{r model, warning = FALSE, results="hide"}
#---------------------------------------
# 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
)
```
```{r model_res, warning = FALSE}
head(results)
```
# Session information
```{R}
sessionInfo()
```