Skip to content

Commit

Permalink
doc: fix interoperability deps
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Oct 30, 2023
1 parent 3d7c07f commit e5a874a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Depends:
DNAZooData,
fourDNData
Imports:
plyinteractions,
diffHic,
strawr,
hicrep,
Expand Down
14 changes: 10 additions & 4 deletions interoperability.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ library(GenomicRanges)
library(InteractionSet)
library(HiCExperiment)
library(HiContactsData)
library(plyinteractions)
library(hicrep)
library(multiHiCcompare)
library(dplyr)
Expand Down Expand Up @@ -81,13 +82,17 @@ enrichment over background.

```{r}
library(diffHic)
set.seed(1234)
# --- Filter to find aggregated interactions
enrichments <- enrichedPairs(iset)
filter <- filterPeaks(enrichments, min.enrich = log2(1.2), min.diag = 5)
filtered_iset <- iset[filter]
filtered_iset
# --- Visualize filtered interactions
library(plyinteractions)
library(HiContacts)
interactions(filtered_iset) |>
filter(seqnames2 == 'II', seqnames1 == seqnames2) |>
plotMatrix(use.scores = 'count')
Expand All @@ -97,11 +102,12 @@ Next, we can cluster filtered interactions that are next to each other.

```{r}
# --- Cluster interactions to find loops
clustered_iset <- clusterPairs(filtered_iset, tol = 2000)
clustered_iset <- clusterPairs(filtered_iset, tol = 5000)
clustered_iset$interactions
# --- Visualize clustered interactions
interactions(filtered_iset) |>
mutate(cluster = clustered_iset$indices[[1]])
mutate(cluster = clustered_iset$indices[[1]]) |>
filter(seqnames2 == 'II', seqnames1 == seqnames2) |>
plotMatrix(use.scores = 'cluster')
```
Expand All @@ -110,7 +116,7 @@ Finally, we can visualize identified individual interaction clusters identified

```{r}
# --- Plot matrix at a clustered loops
cgi <- clustered_iset$interactions[19626]
cgi <- clustered_iset$interactions[554]
seqn <- seqnames(anchors(cgi, type="second"))
start <- start(anchors(cgi, type="second")) - 50000
end <- end(anchors(cgi, type="first")) + 50000
Expand Down Expand Up @@ -229,7 +235,7 @@ DI
## TopDom

The `TopDom` method is widely used to annotate topological domains in genomes from Hi-C
data (@Shin_2016). The `TopDom` package was created to implement this method
data (@Shin_2015). The `TopDom` package was created to implement this method
in `R` (@Bengtsson_2020).

Unfortunately, the format of the input to `TopDom` is rather tricky (see `?TopDom::readHiC`).
Expand Down

0 comments on commit e5a874a

Please sign in to comment.