Skip to content

Code for applying a polymer physics-based penalty to correct distance bias in chromatin interaction data.

Notifications You must be signed in to change notification settings

jlab-code/polymer-penalty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polymer-Penalty

License: MIT

Code and derived parameters for the manuscript: A multi-component power-law penalty corrects distance bias in single-cell co-accessibility and deep-learning chromatin interaction predictions.

This repository provides a framework to correct the systematic distance bias found in proxy data of 3D genome architecture.


Workflow

The method takes biased proxy data and a reference Hi-C dataset as input. It fits a multi-component power-law model to the Hi-C data to derive a penalty function.


Installation

1. Clone the repository

git clone [https://github.com/jlab-code/polymer-penalty.git](https://github.com/jlab-code/polymer-penalty.git)
cd polymer-penalty

2. Install dependencies

pip install -r requirements.txt

Usage

Workflow 1: Applying Pre-computed Global Consensus Penalties

Use our parameters derived for Soybean, Rice, and Maize.

  1. Place your co-accessibility scores in the data/ directory.
  2. Open the Jupyter Notebook: scripts/apply_correction.ipynb.
  3. Select your target species:
# USER: Select species and model type
SPECIES = "Soybean"          
USE_GLOBAL_CONSENSUS = True  
  1. Run all cells.

Workflow 2: Deriving Custom Penalties for New Species

Use our GMM-pipeline to generate a custom model for any species.

  1. Place your Hi-C loops in .bedpe format in the data/ directory.
  2. Open the Jupyter Notebook: scripts/get_penalty_function.ipynb.
  3. Update the data path:
hic_path = "../data/your_new_species_HiC.bedpe"
  1. Run all cells.

Citation

A multi-component power-law penalty corrects distance bias in single-cell co-accessibility and deep-learning chromatin interaction predictions. (2026).


About

Code for applying a polymer physics-based penalty to correct distance bias in chromatin interaction data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published