How arkadiy-garber/mhcscan works
Project type and purpose
• MHCscan is an open-source, command-line bioinformatics pipeline for identifying multiheme cytochromes in either predicted proteomes or raw genomic contigs.
• It is not a web app or microservices suite, but a sequential CLI tool that orchestrates several binaries and scripts.
File structure
• Top-level:
• LICENSE, README.md, setup.sh
• bin/ (all executables and scripts)
• bin/:
• MHCscan.sh – the main orchestrator shell script
• decodeanhmm(.64bit) – compiled binary for HMM decoding
• mhc_annotate.py – Python aggregator for final annotation
• phobius.pl, phobius.model, phobius.options – for transmembrane prediction
• remove_asterisk.py – small helper
• Implied external dependencies (from README): Prodigal, HHSuite, hh-suite databases (e.g., PDB70)
Review the README for pipeline steps
• Input: proteins.faa + annotation.gff (–prot) or contigs.fasta
• Gene calling (if needed): Prodigal
• HMM searches: HHblits/HHsearch against PDB70
• TM prediction: Phobius
• HMM decoding: decodeanhmm
• Final annotation & CSV output: mhc_annotate.py
Main components and their interactions
a. Input layer
– User supplies FASTA (.faa or .fasta) and optionally GFF.
b. Orchestration module
– MHCscan.sh parses flags, sets up temp dirs, invokes each tool in sequence.
c. Gene‐calling
– Prodigal (external binary) turns contigs into proteins + GFF.
d. HMM scanning
e. Transmembrane prediction
– Phobius (internal Perl script + models).
f. HMM decoding
– decodeanhmm binary applies internal logic to HMM outputs.
g. Aggregation & output
– mhc_annotate.py collects all partial results, produces output.csv.
h. Configuration & environment
– setup.sh, Conda environment manages dependencies.
Architectural patterns and principles
• Pipeline pattern: linear, stepwise processing.
• Single-responsibility: each tool does one analysis step.
• Modularity: bin/ directory clearly separates tooling from orchestration.
• Reproducibility: Conda environment boundaries shown as context.
• A zoomed-in inset (or separate page) showing the internal calls within MHCscan.sh (tool order, key flags).