Skip to content

Add differential peak calling layer#3

Open
dhusmann wants to merge 31 commits into
masterfrom
differential_peak_calling
Open

Add differential peak calling layer#3
dhusmann wants to merge 31 commits into
masterfrom
differential_peak_calling

Conversation

@dhusmann
Copy link
Copy Markdown
Owner

@dhusmann dhusmann commented Jan 5, 2026

Summary

  • add differential peak calling subworkflow with DiffBind, ChIPBinner, SPAN diff + cross-comparison
  • add differential-only entrypoint and manifest writing for posthoc runs
  • add modules/scripts plus config/schema/docs/MultiQC updates and differential tests

Testing

  • pytest --keep-workflow-wd --tag test_differential (Slurm 12887126, COMPLETED 0:0)

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: f123e6e362

ℹ️ 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 bin/annotate_regions.py Outdated
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by removing the gtf2bed dependency (parse GTF directly to TSS). Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12887984, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: dcff1ff775

ℹ️ 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 modules/local/chipbinner_hdbscan_grid.nf Outdated
Comment thread subworkflows/local/differential_peak_calling.nf
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by dropping runtime pip installs (hdbscan_grid uses numpy+hdbscan only and the process now uses an hdbscan container). Resolved #3 (comment) by emitting a combined chipbinner.significant.bed (up+down) and using it for cross-method overlaps. Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12888461, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: 5db310993b

ℹ️ 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 bin/diffbind_run.R
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by guarding DiffBind results when FDR/log2FC columns are missing (empty significant set). Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12888753, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: 20fd9f0d8b

ℹ️ 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 bin/annotate_regions.py
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by detecting whether the annotation BED includes a name column and only populating feature_id when present. Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12889044, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: e58d2a635b

ℹ️ 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 modules/local/span_compare.nf Outdated
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by switching SPAN_COMPARE to a samtools container and using JAVA_CMD (if set) for OmniPeaks. Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12889436, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: 853dd7d158

ℹ️ 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 bin/diffbind_run.R
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by calling dba.report with th=1, fold=0 and applying filters downstream. Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12890114, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

@codex review

Copy link
Copy Markdown

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

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: f2b03382a5

ℹ️ 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 modules/local/differential_summary.nf Outdated
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Resolved #3 (comment) by passing summary file paths directly into DIFFERENTIAL_SUMMARY_MERGE (no glob/overwrites). Retested: pytest --keep-workflow-wd --tag test_differential (Slurm 12890801, COMPLETED 0:0).

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 9, 2026

@codex review

Copy link
Copy Markdown

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

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: 88b127ff0e

ℹ️ 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 workflows/differential_only.nf Outdated
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 9, 2026

Addressed pooled-control parsing in d3f1cdd:

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 9, 2026

@codex review

Copy link
Copy Markdown

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

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: d3f1cddf66

ℹ️ 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 modules/local/differential_summary.nf Outdated
@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 9, 2026

Addressed summary staging collision in ae4c3e5:

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 9, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

@dhusmann
Copy link
Copy Markdown
Owner Author

✅ Full pytest-workflow suite passed on Sherlock (Slurm).

Branch: differential_peak_calling
Commit: efbab9d

Most recent test-history entry (docs/test_history/differential_peak_calling.md):

2026-01-10 — differential tag + full pytest suite (Slurm)

  • Failure: ROTS error (rowSums(is.na(...)) expects matrix) when a condition has <2 replicates in test_differential_chipbinner (job 13175581, run dir /scratch/users/dhusmann/runs/pytest-suite/20260109_210345).
    Fix: disable ROTS when <2 samples per condition and fall back to simple tests (or p=1 if <2) in bin/chipbinner_rots.R.

  • Failure: DIFFERENTIAL_SUMMARY_MERGE unbound variable due to $ in staged summary filename (job 13175959, run dir /scratch/users/dhusmann/runs/pytest-suite/20260109_212945).
    Fix: stage summaries with stageAs: 'summaries/*' and build summary_files.list via find summaries -type f in modules/local/differential_summary.nf.

  • Failure: ANNOTATE_REGIONS container missing python (job 13177002, run dir /scratch/users/dhusmann/runs/pytest-suite/20260109_222413).
    Fix: disable container for ANNOTATE_REGIONS so conda provides python (conf/modules.config).

  • Failure: ANNOTATE_REGIONS publishDir error (Unexpected path value from publishDir closure) (job 13178611, run dir /scratch/users/dhusmann/runs/pytest-suite/20260109_225233).
    Fix: replace publishDir closure with a static map + enabled closure in modules/local/annotate_regions.nf.

  • Pass: test_differential_chipbinner tag rerun succeeded (job 13179209, run dir /scratch/users/dhusmann/runs/pytest-suite/20260109_231631).

  • Pass: full pytest suite succeeded (job 13179771, run dir /scratch/users/dhusmann/runs/pytest-suite/20260109_234549).

@dhusmann
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

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

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: efbab9d3fe

ℹ️ 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 bin/chipbinner_rots.R Outdated
@dhusmann
Copy link
Copy Markdown
Owner Author

Addressed #3 (comment) in commit a2d3e85: filter out NA FDR/log2FC rows before building significant beds so BED outputs never include NA coordinates.

@dhusmann
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

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

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: a2d3e85f38

ℹ️ 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 bin/chipbinner_rots.R
@dhusmann
Copy link
Copy Markdown
Owner Author

Addressed #3 (comment) in commit 6f3101c: explicitly label bins with missing cluster IDs as 'NA' so unassigned regions don't appear in stable beds.

@dhusmann
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

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

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: 6f3101c9a1

ℹ️ 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 subworkflows/local/differential_peak_calling.nf
@dhusmann
Copy link
Copy Markdown
Owner Author

Addressed #3 (comment) in commit 0903658: keep an empty control map via ifEmpty([:]) so ChIPBinner still runs when no pooled controls exist.

@dhusmann
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

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

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: 0903658114

ℹ️ 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 subworkflows/local/differential_peak_calling.nf
@dhusmann
Copy link
Copy Markdown
Owner Author

Addressed #3 (comment) in commit 1ef69b2: take the first capability result to make SPAN compare cmd/multibam settings a value channel so every group receives the same constants.

@dhusmann
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ 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".

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.

1 participant