Skip to main content

A tool to identify nucleosome free regions from ChIP-Seq of histone modifications

Project description

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.1101/2020.03.12.989228


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, Xiaoyang Zhang, and Swneke Bailey bioRxiv, 2020 https://doi.org/10.1101/2020.03.12.989228

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

histrader-1.0.2.tar.gz (600.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

histrader-1.0.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file histrader-1.0.2.tar.gz.

File metadata

  • Download URL: histrader-1.0.2.tar.gz
  • Upload date:
  • Size: 600.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for histrader-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6a2749303ed3d3a8993dd7612b0366a68430365eab459f78e87873d7c8496cf0
MD5 16767e5c9145c9d86a8c4057f5a711b5
BLAKE2b-256 c736447d891f1b24725e0a710af2704df1e2a3fc46f7acfa0ad7775e78c6e4ee

See more details on using hashes here.

File details

Details for the file histrader-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: histrader-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.18

File hashes

Hashes for histrader-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 17d1c6e61dfa501d6e9ad3d552f83d7d78bea1cb5c72638834f789a7f2e99e43
MD5 0063ca778401b88e525a40a915121a64
BLAKE2b-256 91a2e1799d37b6bd6dbce0871e91666a6a9a1765f8e8c83f74b1db768b2f6667

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page