# Bioconductor Hicontacts

HiContacts provides a collection of tools to analyse and visualize Hi-C datasets...

- Repository: https://github.com/bioMate-AI/biomate-bioconductor-kb (793 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-06-20
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-hicontacts -g -a claude-code -y`
Codex: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-hicontacts -g -a codex -y`
Cursor: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-hicontacts -g -a cursor -y`
Gemini CLI: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-hicontacts -g -a gemini-cli -y`

## Description

HiContacts provides a collection of tools to analyse and visualize Hi-C datasets imported in R by HiCExperiment.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# HiContacts

## Workflows

### Standard Workflow

```r
library(HiCExperiment)
library(HiContacts)
library(HiContactsData)

# Import Hi-C matrix
cool_file <- HiContactsData('yeast_wt', format = 'cool')
hic <- import(cool_file, format = 'cool')

# Perform matrix arithmetic
hic_detrended <- detrend(hic)
hic_smooth <- despeckle(hic)

# Plot contact map
plotMatrix(hic_smooth, use.scores = 'balanced.despeckled')
```
Input: A `HiCExperiment` object.
Output: Detrended, smoothed, or merged contact maps and their corresponding plots.

### Contact Map Analysis

```r
library(HiCExperiment)
library(HiContacts)
library(HiContactsData)

mcool_file <- HiContactsData('yeast_wt', format = 'mcool')
hic <- import(mcool_file, format = 'mcool', resolution = 1000)

# Calculate cis-trans ratios
ratios <- cisTransRatio(hic)

# Compute distance decay P(s) curves
ps <- distanceLaw(hic)
```
Input: A `HiCExperiment` object, optionally with an associated pairs file.
Output: A tibble of cis-trans ratios and distance decay P(s) curves.

### Topological Feature Mapping

```r
library(HiCExperiment)
library(HiContacts)
library(HiContactsData)

mcool_file <- HiContactsData('yeast_wt', format = 'mcool')
hic <- import(mcool_file, format = 'mcool', resolution = 16000)

# Map chromosome compartments
hic <- getCompartments(hic, chromosomes = c('XV', 'XVI'))

# Compute insulation scores and borders
hic <- refocus(hic, 'II:1-300000') |> 
    zoom(resolution = 1000) |> 
    getDiamondInsulation(window_size = 8000) |> 
    getBorders()
```
Input: A `HiCExperiment` object.
Output: A `HiCExperiment` object updated with compartments, insulation scores, and domain borders.

The rest: https://github.com/bioMate-AI/biomate-bioconductor-kb/blob/HEAD/skills/epigenomics/hicontacts/SKILL.md
