How compepigen/pyjacker works
Project type and purpose
• pyjacker is a Python‑based command‑line bioinformatics tool for detecting enhancer hijacking events in cancer cohorts.
• It ingests genomic data (WGS breakpoints, RNA‑seq expression, allele counts, CNAs, TADs, enhancers, fusions), applies statistical and proximity filters, and outputs interactive HTML reports.
File structure
• Top level:
• Dockerfile, LICENSE, README.md, pyproject.toml (packaging & deployment)
• config_AML.yaml (example config)
• data/ (input examples: TPM, breakpoints, GTFs, cytobands, TADs, ASE files, CNAs, enhancers, fusions)
• pyjacker/ (core Python package)
• Key modules under pyjacker/:
• ase.py – allele‑specific expression
• breakpoints.py – process and filter breakpoints
• cna.py – copy‑number correction
• genes.py – gene coordinate parsing & filtering
• outlier_expression.py – detect expression outliers
• html_reports.py – generate output reports
• pyjacker.py – orchestrator, CLI entrypoint
README for insights
• Config‑driven, single CLI: pyjacker config.yaml
• Optional inputs alter workflow branches (e.g., TAD filtering vs. fixed distance)
• Docker image available for environment encapsulation
• Integration with Nextflow workflow (external) to generate inputs from BAMs
a. Main components:
1. Configuration Layer (config.yaml, config_AML.yaml)
2. Data Sources (data/ folder: expression, breakpoints, GTF, cytobands, TADs, ASE counts, CNAs, enhancers, fusions)
3. Processing Modules (pyjacker/*.py):
– ASE detection
– Expression outlier detection
– Copy‑number correction
– Breakpoint annotation
– Gene coordinate filtering
4. Orchestration Engine (pyjacker.py)
5. Reporting Module (html_reports.py → HTML output)
6. Deployment Runtime (Python interpreter, Docker container)
7. External Workflow (Nextflow pipeline for input generation)
b. Relationships & interactions:
• Config file feeds parameters to the Orchestration Engine.
• Orchestration Engine calls each Processing Module in sequence or conditionally (depending on available inputs).
• Data flows from Data Sources through modules → combined in Orchestration → passed to Reporting Module → HTML output files.
• Deployment Runtime encapsulates the entire pipeline; optional Nextflow workflow sits upstream.
c. Architectural patterns & design principles:
• Modular “pipeline” pattern: each module has a single responsibility.
• Central orchestrator for sequential / conditional execution.
• Plugin‑style extensibility: optional data inputs trigger additional modules.
d. Technologies / frameworks / libraries:
• Python ≥3.7, pandas/numpy (implied)
• pip packaging (pyproject.toml)
• Docker for containerization
• Nextflow (external) for upstream input generation
• HTML templating for reports