Skip to main content

A Snakemake pipeline for integrating HiChIP differential interaction analysis and TF binding analysis.

Project description

SnakeHichipTF

A Comprehensive Snakemake Pipeline for integrating HiChIP / PLAC-Seq Processing and Transcription Factor Binding Analysis


Overview

SnakeHichipTF is a modular, reproducible, and scalable Snakemake-based workflow for integrative analysis of HiChIP and PLAC-seq datasets, with optional integration of ATAC-seq–based transcription factor (TF) footprinting.

Image

The pipeline supports:

  • End-to-end processing from FASTQ → interaction maps → loop calling → TF binding inference
  • Multiple mapping engines: HiC-Pro, Chromap
  • Multiple loop callers: MAPS, FitHiChIP, HiChipper, HiCDCPlus
  • AI-based TF binding inference via scPrinter
  • Footprinting-based TF analysis using TOBIAS
  • Genome setup utilities (restriction fragments, indices)
  • Read downsampling and QC reporting
  • Fully reproducible execution via Snakemake

SnakeHichipTF is designed for flexible experimental designs, including bulk HiChIP, PLAC-seq, and integration with matched ATAC-seq data.


Key Features

1. Modular Architecture

Each analytical stage is implemented as an independent Snakemake rule:

  • Genome preparation
  • Significant interaction analysis
  • Differential interaction analysis
  • TF binding and footprint analysis

This allows selective execution and easy customization.


2. Multi-Algorithm Loop Calling for HiChIP/PLAC-seq

Supported loop callers:

  • MAPS
  • FitHiChIP
  • HiChipper
  • HiCDCPlus

Users can benchmark across algorithms within a single workflow.


3. AI-Based TF Binding Inference (scPrinter)

SnakeHichipTF integrates scPrinter, enabling:

  • seq2PRINT model training
  • TF binding signal inference
  • Motif scanning and TFBS scoring
  • Comparative TF activity visualization

4. ATAC-Seq Footprinting (TOBIAS)

For chromatin accessibility-based TF analysis:

  • Bias correction
  • Footprint detection
  • Motif enrichment
  • TF activity scoring

5. Reproducibility and Scalability

  • Snakemake-managed dependency control
  • Conda environment integration
  • HPC cluster compatibility
  • Parallelized execution
  • Resume capability

Installation

1. Clone Repository

git clone https://github.com/YidanSunResearchLab/SnakeHichipTF.git
cd SnakeHichipTF

2. Create Environment

conda create -n SnakeHichipTF -c conda-forge python=3.13
conda activate SnakeHichipTF
pip install .

(Advanced users may use a dedicated environment for GPU-enabled scPrinter workflows.)

3. Verify Installation

Snakehichip --help

🖥️ Optional: Launch GUI

For a graphical interface:

snakehichiptf-ui

Quick Start Guide

SnakeHichipTF provides several high-level commands.


1️⃣ Genome Setup

Prepare genome indices and restriction fragments.

Genomesetup \
  --organism hg38 \
  --organism_fasta /path/to/genome.fa \
  -o ./genome \
  --restriction_enzyme mboi \
  --bin_size 5000 \
  --threads 32

Outputs:

  • Indexed genome
  • Restriction fragment BED
  • Precomputed binning files

2️⃣ HiChIP / PLAC-Seq Processing

Process FASTQ files into interaction matrices and loop calls.

Snakehichip \
  -i /path/to/input_fastqs/ \
  --genome_dir /path/to/genome \
  -o /path/to/output_directory/ \
  --organism hg38 \
  --bin_size 5000 \
  --threads 32 \
  --downsample_size 50000000

Steps Performed:

  1. Read alignment
  2. Filtering & deduplication
  3. Contact matrix construction
  4. Loop calling (multiple algorithms)
  5. Quality control reporting

3️⃣ Differential HiChIP Analysis

Diffhichip \
  -s /path/to/sample_sheet.tsv \
  -o /path/to/output_directory/ \
  --threads 16 \
  --bin_size 5000 \
  --fitType mean \
  --fdr 0.05

Inputs:

  • Sample sheet describing sample file paths and condition labels, examples are in the data/ folder

Outputs:

  • Differential interaction results
  • FDR-filtered loop sets

4️⃣ TF Binding Analysis via scPrinter

Run AI-based TF binding inference using ATAC-seq input and loop regions.

TFscprinter \
  -o /path/to/output_directory/ \
  --organism hg38 \
  --atacseq_bam "/path/to/sample.bam" \
  --enhancer_bedpe "/path/to/significant_loops.bedpe" \
  --samples "Sample1" \
  --threads 32

Outputs:

  • seq2PRINT trained models
  • TFBS bigWig tracks
  • Motif scanning results
  • TFBS score tables
  • Scatter plot comparisons

5️⃣ ATAC-Seq Footprinting with TOBIAS

TFtobias \
  -o /path/to/output_directory/ \
  --organism hg38 \
  --atacseq_bam "/path/to/sample1.bam /path/to/sample2.bam" \
  --enhancer_bedpe "/path/to/sample1.bedpe /path/to/sample2.bedpe" \
  --samples "Sample1 Sample2" \
  --threads 32 \
  --motif "/path/to/JASPAR2024_CORE_non-redundant_pfms.meme"

Outputs:

  • Corrected bigWig tracks
  • Footprint regions
  • Motif enrichment reports
  • TF activity scores

Directory Structure

SnakeHichipTF/
│
├── snakehichiptf/
│   ├── workflows/
│   ├── rules/
│   ├── scripts/
│   ├── docs/
│
└── setup.py

Documentation

Detailed documentation for each module:

See the docs/ directory for command-level explanations.


Recommended Usage Strategy

For large-scale projects:

  1. Perform genome setup once.
  2. Run Snakehichip for each sample.
  3. Aggregate and run Diffhichip if comparing conditions.
  4. Perform TFscprinter or TFtobias for mechanistic interpretation.

Contributing

Issues and pull requests are welcome:

https://github.com/YidanSunResearchLab/SnakeHichipTF


License

See LICENSE for details.

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

snakehichiptf-0.1.1.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

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

snakehichiptf-0.1.1-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file snakehichiptf-0.1.1.tar.gz.

File metadata

  • Download URL: snakehichiptf-0.1.1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for snakehichiptf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 669b6db05c14e0ed0a506f02ebfc220df0a49e573fb90e9666a965f2a9549e05
MD5 c3e155d90a02c057431f724cc22fd1ec
BLAKE2b-256 f7f647b206fd00f907d09ecb6fea5f2875a6547112faf8b22d12648f55448e4f

See more details on using hashes here.

File details

Details for the file snakehichiptf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: snakehichiptf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for snakehichiptf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7a3e794533e4ba112330f727cca80ef986a27c7b52ee6650b20cfabc47619a0
MD5 a61553ca013114bf6659d1544a82629c
BLAKE2b-256 501c76c4005f1e7f41bfecfa10b709426a0fa5e7e4141239e10b5f1a5079f3da

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