Skip to content

Add curated PHROG marker counts - #35

Merged
linsalrob merged 3 commits into
mainfrom
agent/phrog-marker-counts
Aug 5, 2026
Merged

Add curated PHROG marker counts#35
linsalrob merged 3 commits into
mainfrom
agent/phrog-marker-counts

Conversation

@linsalrob

Copy link
Copy Markdown
Owner

What changed

  • require and validate the authoritative PHROG v4 annotation TSV (gzip or plain text)
  • add curated, auditable read-level marker assignments and union categories
  • emit raw, per-million-all-top-hit, and per-million-PHROG-hit marker matrices
  • add observed-PHROG mapping and per-sample denominator/QC tables
  • generate documentation that explains marker definitions and interpretation limits
  • make the Pawsey counting job validate the database and publish atomically compressed results
  • add focused synthetic regression tests for denominators, overlaps, exclusions, zero-hit samples, and malformed databases

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 passed
  • bash -n pawsey_shortread/count_phrog_functions.slurm pawsey_shortread/mmseqs_add_phrog_function.slurm
  • parsed the supplied real phrog_annot_v4.tsv.gz: 109,404 records, with marker matches in every implemented biological class
  • git diff --cached --check

Copilot AI lite review requested due to automatic review settings August 4, 2026 04:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}.tsv plus 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.

Comment thread pawsey_shortread/count_phrog_functions.slurm Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 4, 2026 04:36
@linsalrob
linsalrob marked this pull request as ready for review August 4, 2026 04:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

@linsalrob

Copy link
Copy Markdown
Owner Author

@codex please review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread pawsey_shortread/count_phrog_functions.slurm
Copilot AI review requested due to automatic review settings August 5, 2026 03:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.

@linsalrob
linsalrob merged commit 0cb2140 into main Aug 5, 2026
1 check passed
@linsalrob
linsalrob deleted the agent/phrog-marker-counts branch August 5, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants