How jodyphelan/tbprofiler works
TB-Profiler is a command-line tuberculosis sequencing profiler. Users provide FASTQ or an existing BAM; the documented workflow aligns reads, calls variants, compares them with a resistance database, and writes sample reports. The repository also supports whole-genome SNP-distance comparisons, spoligotyping, and cohort collation. The README and sampled modules support the report and analysis branches shown here; the main CLI implementation and some pipeline wiring were not sampled, so those links are documented at the product level rather than attributed to unseen internal calls.
Main entry points: tb-profiler TB-Profiler CLI · models.py Result models · output.py Output dispatcher · snp_dists.py SNP-distance search
Components 19
Sequence analysis
- Read alignment
- Variant calling
Variant interpretation
- Resistance database
db/who_v2+ - Result reformatting
tbprofiler/reformat.py - Interpretation rules
tbprofiler/rules.py - Plugin interface
tbprofiler/plugins.py - Result models
tbprofiler/models.py
Additional analyses
- Whole-genome calling
- Consensus VCF
tbprofiler/consensus.py - SNP-distance search
tbprofiler/snp_dists.py - Spoligotyping
tbprofiler/spoligotyping.py
Results and reporting
- Output dispatcher
tbprofiler/output.py - Text and CSV reports
tbprofiler/text.py - Word reports
tbprofiler/docx.py
Cohort analysis
- Sample collation
tbprofiler/collate.py
Other components
- CLI user
- TB-Profiler CLI
tb-profiler - FASTQ or BAM
- Sample results
Connections 25
- CLI user → TB-Profiler CLI: runs
README.md - TB-Profiler CLI → FASTQ or BAM: accepts input
README.md - TB-Profiler CLI → Read alignment: aligns reads
README.md - Read alignment → Variant calling: produces alignments
README.md - Variant calling → Resistance database: compares variants
README.md - TB-Profiler CLI → Result reformatting: formats results
- Result reformatting → Result models: builds results
tbprofiler/reformat.py - Interpretation rules → Plugin interface: extends
tbprofiler/rules.py - TB-Profiler CLI → Interpretation rules: applies rules
- TB-Profiler CLI → Whole-genome calling: enables genome-wide calling
README.md - Whole-genome calling → Variant calling: calls variants
README.md - TB-Profiler CLI → SNP-distance search: enables distance search
README.md - SNP-distance search → Consensus VCF: gets consensus VCF
tbprofiler/snp_dists.py - SNP-distance search → Result models: updates linked samples
tbprofiler/snp_dists.py - TB-Profiler CLI → Spoligotyping: enables spoligotyping
README.md - Spoligotyping → FASTQ or BAM: analyzes FASTQ or BAM
tbprofiler/spoligotyping.py - TB-Profiler CLI → Output dispatcher: writes results
- Output dispatcher → Result models: serializes result
tbprofiler/output.py - Output dispatcher → Text and CSV reports: writes text or CSV
tbprofiler/output.py - Output dispatcher → Word reports: writes Word report
tbprofiler/output.py - Text and CSV reports → Result models: renders result fields
tbprofiler/text.py - Word reports → Result models: renders result fields
tbprofiler/docx.py - Output dispatcher → Sample results: writes reports
tbprofiler/output.py - TB-Profiler CLI → Sample collation: collates samples
- Sample collation → Result models: loads sample results
tbprofiler/collate.py