How merck/deepbgc works
DeepBGC is a command-line genome-mining tool that annotates sequences, detects biosynthetic gene clusters (BGCs), classifies predicted clusters, and writes reports. The main path runs through the pipeline command: sequence input is annotated with proteins and Pfam domains, scored by a detector, classified, and exported in several formats. Separate documented workflows prepare training data and train custom models; download and info commands support model and database setup. Some links for unsampled command and classifier behavior rely on the README and SOURCE INDEX rather than inspected implementation details.
Main entry points: pipeline.py Pipeline command · wrapper.py Sequence model wrapper · main.py Command router · annotator.py Record annotator
Components 29
CLI workflows
- Command router
deepbgc/main.py - Pipeline command
deepbgc/command/pipeline.py - Prepare command
deepbgc/command/prepare.py - Train command
deepbgc/command/train.py - Download command
deepbgc/command/download.py - Info command
deepbgc/command/info.py
Sequence annotation
- Record annotator
deepbgc/pipeline/annotator.py - Protein prediction
deepbgc/pipeline/protein.py - Pfam scanning
deepbgc/pipeline/pfam.py
BGC prediction
- BGC detector
deepbgc/pipeline/detector.py - Cluster classifier
deepbgc/pipeline/classifier.py
Model runtime
- Sequence model wrapper
deepbgc/models/wrapper.py - RNN detector
deepbgc/models/rnn.py - HMM detector
deepbgc/models/hmm.py - Random forest
deepbgc/models/random_forest.py - Feature transforms
deepbgc/features.py - Downloaded models and Pfam
deepbgc/data.py
Reports and outputs
- Output writers
deepbgc/output/writer.py - GenBank output
deepbgc/output/genbank.py - Cluster TSV
deepbgc/output/cluster_tsv.py - Pfam TSV
deepbgc/output/pfam_tsv.py - antiSMASH JSON
deepbgc/output/antismash_json.py - Evaluation plots
deepbgc/output/evaluation
Other components
- Researcher
- Genome sequence
- HMMER
- Prodigal
- Output directory
- antiSMASH viewer
Connections 36
- Researcher → Command router: runs command
deepbgc/main.py - Genome sequence → Pipeline command: provides input
deepbgc/command/pipeline.py - Command router → Pipeline command: dispatches to
deepbgc/main.py - Command router → Prepare command: dispatches to
deepbgc/main.py - Command router → Train command: dispatches to
deepbgc/main.py - Command router → Download command: dispatches to
deepbgc/main.py - Command router → Info command: dispatches to
deepbgc/main.py - Pipeline command → Record annotator: runs annotation
deepbgc/command/pipeline.py - Record annotator → Protein prediction: runs if needed
deepbgc/pipeline/annotator.py - Record annotator → Pfam scanning: runs if needed
deepbgc/pipeline/annotator.py - Protein prediction → Prodigal: predicts proteins
README.md - Pfam scanning → HMMER: scans domains
deepbgc/pipeline/pfam.py - Pipeline command → BGC detector: runs detection
deepbgc/command/pipeline.py - Pipeline command → Cluster classifier: runs classification
deepbgc/command/pipeline.py - BGC detector → Sequence model wrapper: predicts with
deepbgc/pipeline/detector.py - Cluster classifier → Sequence model wrapper: classifies with
deepbgc/pipeline/classifier.py - Sequence model wrapper → Feature transforms: transforms samples
deepbgc/models/wrapper.py - Sequence model wrapper → RNN detector: loads model
deepbgc/models/wrapper.py - Sequence model wrapper → HMM detector: loads model
deepbgc/models/wrapper.py - Sequence model wrapper → Random forest: loads model
- BGC detector → Downloaded models and Pfam: resolves model
deepbgc/pipeline/detector.py - Download command → Downloaded models and Pfam: downloads assets
deepbgc/command/download.py - Info command → Downloaded models and Pfam: reports assets
deepbgc/command/info.py - Prepare command → Record annotator: prepares sequences
deepbgc/command/prepare.py - Train command → Sequence model wrapper: trains models
deepbgc/command/train.py - Pipeline command → GenBank output: writes records
deepbgc/command/pipeline.py - Pipeline command → antiSMASH JSON: writes annotations
deepbgc/command/pipeline.py - Pipeline command → Cluster TSV: writes clusters
deepbgc/command/pipeline.py - Pipeline command → Pfam TSV: writes domains
deepbgc/command/pipeline.py - Pipeline command → Evaluation plots: writes evaluation
deepbgc/command/pipeline.py - GenBank output → Output writers: uses writer base
deepbgc/output/genbank.py - Cluster TSV → Output writers: uses writer base
deepbgc/output/cluster_tsv.py - Pfam TSV → Output writers: uses writer base
deepbgc/output/pfam_tsv.py - antiSMASH JSON → Output writers: uses writer base
deepbgc/output/antismash_json.py - Pipeline command → Output directory: creates reports
deepbgc/command/pipeline.py - antiSMASH JSON → antiSMASH viewer: uploads annotations
README.md