data("hic_example_data")
data("mm9_refseq_promoters")
data("thymus_enhancers")
annotateInteractions(hic_example_data, list(promoter = mm9_refseq_promoters, enhancer = thymus_enh))
# can be slow so subset of features used for examples
p <- unique(unlist(head(regions(hic_example_data)$promoter.id)))
e <- unique(unlist(head(regions(hic_example_data)$enhancer.id)))
p <- p[!is.na(p)]
p <- mm9_refseq_promoters[p]
e <- e[!is.na(e)]
e <- thymus_enh[e]
ep_summary <- summariseByFeaturePairs(hic_example_data, p, "promoter", e, "enhancer")
Run the code above in your browser using DataLab