Skip to content

jlab-code/polymer-penalty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polymer-Penalty

License: MIT DOI

Code and derived parameters for the manuscript: Power-law penalties correct distance bias in single-cell co-accessibility and deep-learning chromatin interaction predictions.


Data Availability

The processed datasets, including Hi-C loop sets and co-accessibility scores used in this study, are available on Zenodo:
👉 Link to Zenodo Dataset


Installation

1. Clone the repository

git clone 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.


Repository Note

The code in this repository is actively maintained. For the latest features, bug fixes, and parameter updates, please refer to the GitHub repository: https://github.com/jlab-code/polymer-penalty.

Citation

Power-law penalties correct 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

 
 
 

Contributors