Add curated PHROG marker counts - #35
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the PHROG-counting workflow to require an authoritative PHROG v4 annotation TSV and to generate curated, auditable read-level biological marker count matrices (raw and per-million normalisations), along with supporting QC/denominator outputs and focused regression tests.
Changes:
- Added curated PHROG marker classification rules and emitted
*_marker_{raw,norm_all,norm_phrog}.tsvplus mapping/QC summary tables. - Required and validated an authoritative PHROG annotation TSV (plain or gz) and validated MMseqs report PHROG records against it.
- Updated the Pawsey SLURM job to validate the database and publish compressed outputs via a temporary directory; added synthetic unit tests covering key marker/denominator behaviors.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/count_phrog_functions.py |
Adds authoritative PHROG DB validation, marker classification/matrices, and mapping/QC outputs. |
pawsey_shortread/count_phrog_functions.slurm |
Validates PHROG DB presence/gzip integrity and publishes compressed results atomically via a temp dir. |
tests/test_count_phrog_functions.py |
Adds regression tests for marker counting, normalisation denominators, exclusions/overlaps, zero-hit samples, and malformed DB handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3cae9275d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What changed
Why
The existing workflow summarized PHROG IDs, annotations, and categories but did not provide conservative biological marker summaries. These additions make read-level marker abundance directly available while avoiding claims of definitive phage lifestyle classification.
Validation
PYTHONDONTWRITEBYTECODE=1 python -m unittest discover -s tests -v— 3 tests passedbash -n pawsey_shortread/count_phrog_functions.slurm pawsey_shortread/mmseqs_add_phrog_function.slurmphrog_annot_v4.tsv.gz: 109,404 records, with marker matches in every implemented biological classgit diff --cached --check