Skip to main content

HisTrader

Introduction

HisTrader is a tool designed to identify Nucleosome-Free Regions (NFRs) from ChIP-Seq data targeting histone modifications. It takes a signal file (bedGraph or bigWig) and a broad peak file as input, and outputs BED files identifying NFRs and nucleosome-occupied regions (NORs) within those peaks.

NFRs are detected using a combination of moving averages and second-order differencing to identify valley-like patterns within peaks.

HisTrader graphical abstract

For more details, please refer to our publication: https://doi.org/10.1016/j.crmeth.2026.101607


Installation

Requires Python 3.8+ and the following packages:

pip install histrader

# or

pip install numpy pandas pyranges pyBigWig pytest
pip install .

Usage

python histrader.py --signal ChIP.bedGraph/bigWig --peaks ChIP.bed

Required Parameters

Flag Description
--signal ChIP-Seq signal file in bedGraph or bigWig format
--peaks Broad peak file in BED format

Optional Parameters

Flag Description Default
--genome Genome FASTA file (used to extract DNA sequences from NFRs) —
--trim Trim extracted FASTA sequences (requires --genome and --trimSize) off
--trimSize Length (bp) of trimmed sequences, centred on each NFR 100
--out Output file prefix Histrader
--method NFR detection method: MA, DIFF, or BOTH BOTH
--step Fixed step size (bp) for the converted signal 25
--minSize Minimum peak size (bp) for NFR calling 500
--nucSize Estimated nucleosome size (bp); should be divisible by --step 150
--mergeMulti Step multiplier for merging (merge distance = mergeMulti × step) 3
--maMulti Nucleosome multiplier for the slow moving average 3
--pMax Fraction of peak max signal used as a zeroing threshold (0 = off) 0.0
--filter Discard NFRs wider than this value (bp) 1000
--maxValley Keep only the NFR at the max peak region per peak off
--useDifferential With --maxValley, use differential-based NFR selection off
--randValley Keep only one random NFR per peak off
--seed Random seed for reproducible --randValley output —
--outBG Also output the fixed-step signal within peaks (bedGraph) off

Output Files

File Contents
<prefix>.nfr.bed Nucleosome-Free Regions
<prefix>.nuc.bed Nucleosome-Occupied Regions
<prefix>.missing.bed Peaks where no NFR was detected
<prefix>.nfr.fa NFR sequences (only with --genome)
<prefix>.nuc.fa Nucleosome sequences (only with --genome)
<prefix>.bedGraph Fixed-step signal track (only with --outBG)

Example

python histrader.py \
  --signal  ChIP.bedGraph \
  --peaks   ChIP.bed \
  --method  BOTH \
  --step    25 \
  --nucSize 150 \
  --pMax    0.1 \
  --out     output_prefix

Test Data

Test data for a single H3K27ac peak on chr11 is provided in TEST_DATA/:

python histrader.py \
  --signal TEST_DATA/test.region.histrader.chr11_12286115_12289133.H3K27AC.bdg \
  --peaks  TEST_DATA/test.region.histrader.chr11_12286115_12289133.H3K27AC.broadPeak \
  --out    test_output

Tests

pytest test_histrader.py -v

Citation

If you use HisTrader in your research, please cite:

HisTrader: A Tool to Identify Nucleosome Free Regions from ChIP-Seq of Histone Post-Translational Modifications Eftyhios Kirbizakis, Yifei Yan, Ansley Gnanapragasam, Juliana Cavalcante de Moura, Xiaoyang Zhang, and Swneke D. Bailey Cell Reports Methods, 2026, 101607 https://doi.org/10.1016/j.crmeth.2026.101607

Release files for histrader 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for histrader 1.1.0
File Size Uploaded
histrader-1.1.0.tar.gz 601.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for histrader 1.1.0
File Interpreter ABI Platform
histrader-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 614.7 kB

Release files / histrader-1.1.0.tar.gz

Download URL histrader-1.1.0.tar.gz
Size 601.3 kB
Tags Source
SHA-256 checksum
How to use checksums
622a5322aaaed9f19ad70c806cda26c2da8c4c60462b88451b031d8b4b995867
BLAKE2b-256 checksum
How to use checksums
178a0593cc86e9b30791810bf476fc307b1caf3c220d08a9d2cdb800320bf574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / histrader-1.1.0-py3-none-any.whl

Download URL histrader-1.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1511102dc4cc615676e0a89db55d1659ebc7f213918e442caa5cac192e848c0d
BLAKE2b-256 checksum
How to use checksums
f3df923df6506507918cc9862bf7b34e74a1c403cfa62d1698294fbf724a8c24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page