Skip to content

Fix control matching and pooling fallback reporting#4

Open
dhusmann wants to merge 19 commits into
masterfrom
adding_new_peak_callers
Open

Fix control matching and pooling fallback reporting#4
dhusmann wants to merge 19 commits into
masterfrom
adding_new_peak_callers

Conversation

@dhusmann
Copy link
Copy Markdown
Owner

@dhusmann dhusmann commented Jan 5, 2026

Summary\n- Enforce condition-matched controls in samplesheet validation (fail-fast by default; optional cross-condition override).\n- Prevent silent drops when pooled controls are missing; skip control-required callers with warnings and recorded reasons.\n- Always emit control pooling report with status/action fields; update docs accordingly.\n\n## Testing\n- Not run (spec-only changes).

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Added standard spike-in scale-factor TSV outputs (no --dump_scale_factors gating) and optional debug scope reference output. Commit: 5151d32.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Commit c2db7f8: expand peak QC to all callers. PEAK_QC now runs on all peak/consensus streams, adds caller-aware peak QC tables in 03_peak_calling/07_qc_tables (peak_counts, peak_frip_scores, peak_reproducibility, consensus_peak_counts), and makes peak heatmap inputs per caller with caller-tagged filenames. Also updates MultiQC section labels/docs and enables SEACR summit extraction when SEACR is not primary.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Commit 019dd4a: align spec-facing peak outputs to biological sample IDs. Peak-calling artifacts (bedgraph/bigwig/peaks), heatmaps, QC tables, and control fallback/normalisation reports now use {group}_{condition}_rep{replicate} (no _T#). Updated heatmap ID handling, peak caller prefixes, and tests to match new naming.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Commit 069fc0e: add --consensus_grouping all support (maps to all-samples consensus). Updated flowswitch, schema, docs, and tests; consensus outputs documented under 03_peak_calling/05_consensus_peaks/all/all.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Commit 061930c: add CI tests for control validation, scale-factor outputs, multi-caller QC, and sample-ID naming. New missing-control samplesheet + failfast/override tests; epic2 missing-control skip test checks fallback TSV; spike-in test checks normalisation_factors/all.tsv; new multi-caller QC test checks caller_id values and no _T in sample IDs; CI tag matrix updated.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Commit 981eedb: allow --consensus_grouping all validation; use fallback pooled controls (status= fallback_other_condition, action=used) and record missing-control skips with full columns; --allow_cross_condition_controls now warns (including zero-control groups) instead of failing; samplesheet.valid.csv id now uses group_condition_rep (no _T); updated/added tests incl. no-controls samplesheet, epic2 fallback+skip, and output expectations without _T. Tests not run per instructions.

@dhusmann
Copy link
Copy Markdown
Owner Author

dhusmann commented Jan 5, 2026

Commit 27005d3: surface samplesheet warnings via samplesheet.warnings.txt and log them in INPUT_CHECK; adjust FRiP join to preserve multi-caller peaks; move ch_scope_reference init to workflow scope; keep caller_ids handling in cutandrun workflow. Tests: full pytest-workflow via Slurm job 12911989 PASS (323 passed, 102 warnings) in /scratch/users/dhusmann/nextflow-work/runs/pytest_full/20260105_061940.

@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: 27005d391d

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

dhusmann commented Jan 9, 2026

Addressed #4 (comment) in commit e8e2b6f: pair_targets_controls now preserves targets when controls are missing (no silent drops). SEACR/MACS2 now log a warning and run without control for those samples when --use_control is true but control group is absent.

@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: e8e2b6f893

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

dhusmann commented Jan 9, 2026

Addressed #4 (comment) in commit 4583100: updated missing-control warnings to explicitly flag possible typos and document behavior (epic2/span skipped; SEACR/MACS2 run without control).

@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: 4583100108

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

dhusmann commented Jan 9, 2026

Addressed #4 (comment) in commit 79880d9: group peak-summit beds by sample_id before joining with bigwigs, then expand to preserve all caller-specific peak sets (no caller dropped during heatmap prep).

@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. Keep them coming!

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

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

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

Pushed commit 50d0df8 fixing SPAN + peak QC issues in dev0. Summary of changes:

  • modules/local/span_omnipeaks_analyze.nf: switch to Temurin 21 JDK image, add --add-modules jdk.incubator.vector, and ensure output prefix ends with .peak. Fixes Omnipeak Vector API NoClassDefFoundError and Nextflow missing *.peak outputs.
  • subworkflows/local/peak_qc.nf + workflows/cutandrun.nf: pass chrom sizes into PEAK_QC and sort repro beds with bedtools sort -g before intersect. Fixes bedtools intersect failures with chr mismatch and -sorted ordering errors.
  • conf/modules.config: filter header lines in AWK_NAME_PEAK_BED (prevents #Chromosome headers from breaking QC) and set BEDTOOLS_INTERSECT output prefix to avoid input/output name collisions after sorting.

These resolve: SPAN NoClassDefFoundError, SPAN .peak missing, bedtools intersect chrY mismatch, bedtools -sorted order error, and intersect input/output name collision.

@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: 50d0df8cce

ℹ️ 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/peak_frip.nf Outdated
Comment on lines +27 to +28
MAPPED_READS=\$(grep -m 1 'mapped (' ${flagstat} | awk '{print \$1}')
FRIP_SCORE=\$(awk -v a="\$READS_IN_PEAKS" -v b="\$MAPPED_READS" 'BEGIN {OFS="\\t"} {if (b > 0) {print a / b} else {print 0}}')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fix FRiP score computation to actually output a value

The new FRIP_SCORE=$(awk …) call runs awk with no input stream, so the default rule never executes and FRIP_SCORE ends up empty for every sample. That means both *_frip_score.txt and the MultiQC table rows are blank even when mapped reads are present. This happens unconditionally because the awk command isn’t fed any input; use a BEGIN block that prints, or pipe a dummy line into awk.

Useful? React with 👍 / 👎.

@dhusmann
Copy link
Copy Markdown
Owner Author

Pushed commit 5cc7de0 with peak QC repro fixes + config parse fix.

Changes:

  • conf/modules.config: CUT_CALC_REPROD now emits BED4 (chr/start/end/key) via awk so bedtools intersect -C produces 5 cols; also fixed Groovy config quoting to avoid Nextflow parse error.
  • subworkflows/local/peak_qc.nf: preserve caller/group metadata when building intersect inputs (meta now carries caller), so repro QC tables are caller-aware.

Resolves:

  • CALCULATE_PEAK_REPROD failure: "Invalid file format detected" (4‑col intersect)
  • Nextflow startup crash due to Groovy token recognition error in modules.config
  • caller ambiguity in peak reproducibility metrics.

@dhusmann
Copy link
Copy Markdown
Owner Author

Pushed commit 3f05d4a with fixes for late-stage failures.

Changes:

  • conf/resources.config: bumped FRAG_LEN_HIST memory to 72G to prevent OOM.
  • modules/local/custom_dumpsoftwareversions.nf: sanitize versions.yml lines before YAML parsing (drop stray/warning lines and quote values) to prevent CUSTOM_DUMPSOFTWAREVERSIONS crash.
  • modules/local/epic2_callpeak.nf: extract Epic2 version via regex to avoid warnings/extra text in versions.yml.

Resolves:

  • FRAG_LEN_HIST OUT_OF_MEMORY (36G).
  • CUSTOM_DUMPSOFTWAREVERSIONS YAML ScannerError caused by epic2 version warnings in versions.yml.

@dhusmann
Copy link
Copy Markdown
Owner Author

@codex review

@dhusmann
Copy link
Copy Markdown
Owner Author

Addressed Codex review note on FRiP: updated PEAK_FRIP awk to print in BEGIN block (no input stream needed), so FRIP_SCORE is no longer empty. Commit: 4cbb959.

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: 3f05d4ac99

ℹ️ 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/cutandrun.nf
Comment on lines 862 to +864
PEAK_QC(
ch_peaks_primary,
ch_peaks_with_ids_primary,
ch_consensus_peaks_primary,
ch_consensus_peaks_unfilt_primary,
ch_peaks_all,
ch_peaks_with_ids_all,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ensure per-caller peak QC uses unique sample IDs

Switching PEAK_QC to consume ch_peaks_all means each biological sample now contributes multiple peak sets (one per caller), but the QC modules still derive output prefixes and MultiQC sample names from meta.id alone (see modules/local/peak_frip.nf and modules/local/peak_counts.nf, which default to ${meta.id} for output filenames). Because meta.id remains the sample ID (caller is only in meta.caller), per-caller QC files share the same basename and MultiQC will collapse or overwrite them, leaving only one caller’s FRiP/peak-count metrics per sample. Consider augmenting meta.id with the caller (e.g., ${sample_id}_${caller}) before invoking PEAK_QC, or update the QC modules to incorporate meta.caller in their prefixes.

Useful? React with 👍 / 👎.

@dhusmann
Copy link
Copy Markdown
Owner Author

Pushed commit adef1f0: fixes callers initialization and PREPARE_PEAKCALLING inputs.

Changes:

  • lib/WorkflowCutandrun.groovy: compute params.callers after params are loaded (peakcaller string → normalized caller list). Fixes seacr being silently omitted due to params-file ordering.
  • workflows/cutandrun.nf: preserve pre-dedup samtools stats/flagstat/idxstats for targets and mix them back when dedup_target_reads=false. Ensures PREPARE_PEAKCALLING has target BAM+flagstat pairs so SEACR/bedgraph steps run for all samples.

Outcome: DEEPTOOLS_BAMCOVERAGE now emits for all samples; SEACR should schedule once peak prep completes.

@dhusmann
Copy link
Copy Markdown
Owner Author

Pushed commit f345f8e: avoid MultiQC filename collisions for peak reproducibility.

Change:

  • conf/modules.config: set CALCULATE_PEAK_REPROD ext.prefix to "${meta.sample_id ?: meta.id}_${meta.caller}" so each caller produces a unique *_mqc.tsv. Prevents MultiQC input file name collisions when multiple peak callers are enabled.

@dhusmann
Copy link
Copy Markdown
Owner Author

Success!
executor > slurm (509)
[d6/033915] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:GUNZIP_FASTA (mm10-GRCm38.chr_only.genome.fa.gz) [100%] 1 of 1, cached: 1 ✔
[1c/a49f43] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:GUNZIP_GTF (mm10-gencode.vM25.chr_only.annotation.gtf.gz) [100%] 1 of 1, cached: 1 ✔
[f3/0c5fd1] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:GTF2BED (mm10-gencode.vM25.chr_only.annotation.gtf) [100%] 1 of 1, cached: 1 ✔
[83/4e6ded] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:ANNOTATION_BEDTOOLS_SORT (mm10-gencode.vM25.chr_only.annotation.bed) [100%] 1 of 1, cached: 1 ✔
[7c/2019f8] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:TABIX_BGZIPTABIX (mm10-gencode.vM25.chr_only.annotation.bed) [100%] 1 of 1, cached: 1 ✔
[13/2f43db] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:SAMTOOLS_FAIDX (mm10-GRCm38.chr_only.genome.fa) [100%] 1 of 1, cached: 1 ✔
[47/7cb49e] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:TARGET_CHROMSIZES (mm10-GRCm38.chr_only.genome.fa) [100%] 1 of 1, cached: 1 ✔
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:SPIKEIN_CHROMSIZES -
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:BOWTIE2_BUILD_SPIKEIN -
[27/c95b3f] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:BLACKLIST_AWK (chromsizes) [100%] 1 of 1, cached: 1 ✔
[68/5dd6df] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:BLACKLIST_BEDTOOLS_INTERSECT (blacklist) [100%] 1 of 1, cached: 1 ✔
[d0/e4f27c] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:BLACKLIST_BEDTOOLS_SORT (blacklist) [100%] 1 of 1, cached: 1 ✔
[e8/c16220] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_GENOME:BLACKLIST_BEDTOOLS_COMPLEMENT (blacklist) [100%] 1 of 1, cached: 1 ✔
[c4/37b356] process > NFCORE_CUTANDRUN:CUTANDRUN:INPUT_CHECK:SAMPLESHEET_CHECK (samplesheet.bpm_all.csv) [100%] 1 of 1, cached: 1 ✔
[29/1f5be7] process > NFCORE_CUTANDRUN:CUTANDRUN:CAT_FASTQ (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[6b/0f2221] process > NFCORE_CUTANDRUN:CUTANDRUN:FASTQC_TRIMGALORE:FASTQC (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[4a/4d2126] process > NFCORE_CUTANDRUN:CUTANDRUN:FASTQC_TRIMGALORE:TRIMGALORE (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[73/00f0d7] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BOWTIE2_TARGET_ALIGN (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BOWTIE2_SPIKEIN_ALIGN -
[21/baf014] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[51/699000] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[01/237bba] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_STATS (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[38/6eec12] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_FLAGSTAT (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[26/d2321a] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_IDXSTATS (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS_SPIKEIN:SAMTOOLS_SORT -
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS_SPIKEIN:SAMTOOLS_INDEX -
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS_SPIKEIN:BAM_STATS_SAMTOOLS:SAMTOOLS_STATS -
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS_SPIKEIN:BAM_STATS_SAMTOOLS:SAMTOOLS_FLAGSTAT -
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:ALIGN_BOWTIE2:BAM_SORT_STATS_SAMTOOLS_SPIKEIN:BAM_STATS_SAMTOOLS:SAMTOOLS_IDXSTATS -
[b9/34c7cb] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_BT2_TARGET_META:AWK_SCRIPT (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[- ] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_BT2_SPIKEIN_META:AWK_SCRIPT -
[10/e8fcfa] process > NFCORE_CUTANDRUN:CUTANDRUN:FILTER_READS:SAMTOOLS_VIEW (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[c0/bb7666] process > NFCORE_CUTANDRUN:CUTANDRUN:FILTER_READS:SAMTOOLS_SORT (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[56/651fcc] process > NFCORE_CUTANDRUN:CUTANDRUN:FILTER_READS:SAMTOOLS_INDEX (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[14/d05490] process > NFCORE_CUTANDRUN:CUTANDRUN:FILTER_READS:BAM_STATS_SAMTOOLS:SAMTOOLS_STATS (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[24/10a7f1] process > NFCORE_CUTANDRUN:CUTANDRUN:FILTER_READS:BAM_STATS_SAMTOOLS:SAMTOOLS_FLAGSTAT (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[a8/e1567f] process > NFCORE_CUTANDRUN:CUTANDRUN:FILTER_READS:BAM_STATS_SAMTOOLS:SAMTOOLS_IDXSTATS (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[1b/fd33ac] process > NFCORE_CUTANDRUN:CUTANDRUN:PRESEQ_LCEXTRAP (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[55/caaf20] process > NFCORE_CUTANDRUN:CUTANDRUN:MARK_DUPLICATES_PICARD:PICARD_MARKDUPLICATES (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[a8/11ad9e] process > NFCORE_CUTANDRUN:CUTANDRUN:MARK_DUPLICATES_PICARD:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[d9/4aabba] process > NFCORE_CUTANDRUN:CUTANDRUN:MARK_DUPLICATES_PICARD:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[20/fc0946] process > NFCORE_CUTANDRUN:CUTANDRUN:MARK_DUPLICATES_PICARD:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_STATS (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[81/d0a6e7] process > NFCORE_CUTANDRUN:CUTANDRUN:MARK_DUPLICATES_PICARD:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_FLAGSTAT (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[d2/459f53] process > NFCORE_CUTANDRUN:CUTANDRUN:MARK_DUPLICATES_PICARD:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_IDXSTATS (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[c7/c728d0] process > NFCORE_CUTANDRUN:CUTANDRUN:DEDUPLICATE_PICARD:PICARD_MARKDUPLICATES (IgG_sgNSD3_rep2) [100%] 4 of 4, cached: 4 ✔
[25/68ae64] process > NFCORE_CUTANDRUN:CUTANDRUN:DEDUPLICATE_PICARD:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT (IgG_sgNSD3_rep2) [100%] 4 of 4, cached: 4 ✔
[7f/2d99ae] process > NFCORE_CUTANDRUN:CUTANDRUN:DEDUPLICATE_PICARD:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX (IgG_sgNSD3_rep2) [100%] 4 of 4, cached: 4 ✔
[23/d82255] process > NFCORE_CUTANDRUN:CUTANDRUN:DEDUPLICATE_PICARD:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_STATS (IgG_sgNSD3_rep2) [100%] 4 of 4, cached: 4 ✔
[5f/8ba293] process > NFCORE_CUTANDRUN:CUTANDRUN:DEDUPLICATE_PICARD:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_FLAGSTAT (IgG_sgNSD3_rep2) [100%] 4 of 4, cached: 4 ✔
[f3/44ba87] process > NFCORE_CUTANDRUN:CUTANDRUN:DEDUPLICATE_PICARD:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:SAMTOOLS_IDXSTATS (IgG_sgNSD3_rep2) [100%] 4 of 4, cached: 4 ✔
[05/89ff5f] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_PICARD_DUP_META:AWK (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[b8/00cb90] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:DEEPTOOLS_BAMCOVERAGE (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[f0/996803] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:BEDTOOLS_SORT (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[a7/2d386e] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:UCSC_BEDCLIP (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[05/7c978e] process > NFCORE_CUTANDRUN:CUTANDRUN:PREPARE_PEAKCALLING:UCSC_BEDGRAPHTOBIGWIG (NSD3_sgNSD3_rep1) [100%] 28 of 28, cached: 28 ✔
[08/d0e9db] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:SEACR_CALLPEAK (NSD3_sgNSD3_rep1) [100%] 24 of 24, cached: 24 ✔
[70/d34a4f] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:MACS2_CALLPEAK_NARROW (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[92/a3a022] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:MACS2_CALLPEAK_BROAD (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[5f/1f0a80] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:GOPEAKS_CALLPEAK_NARROW (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[2f/2f7550] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:GOPEAKS_CALLPEAK_BROAD (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[30/ae6ef7] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:POOL_IGG_CONTROLS (IgG_sgControl) [100%] 2 of 2, cached: 2 ✔
[e5/a277b2] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:EPIC2_CALLPEAK_200 (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[6a/1af48f] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:EPIC2_CALLPEAK_150 (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[67/bd6ffa] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:EPIC2_CALLPEAK_25 (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[cd/7a2643] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:SPAN_OMNIPEAKS_DEFAULT (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[8b/922a72] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_CALLING_EXTENDED:SPAN_OMNIPEAKS_STRINGENT (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[6b/338401] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_TO_BED (NSD3_sgNSD3_rep2) [100%] 48 of 48, cached: 48 ✔
[0b/c1cfdc] process > NFCORE_CUTANDRUN:CUTANDRUN:AWK_EXTRACT_SUMMITS (NSD3_sgNSD3_rep1) [100%] 24 of 24, cached: 24 ✔
[6c/66cc8b] process > NFCORE_CUTANDRUN:CUTANDRUN:AWK_NAME_PEAK_BED (NSD3_sgNSD3_rep1) [100%] 240 of 240, cached: 240 ✔
[0f/891620] process > NFCORE_CUTANDRUN:CUTANDRUN:CONSENSUS_PEAKS:SORT (NSD3_sgNSD3_seacr) [100%] 120 of 120, cached: 120 ✔
[1b/ce3165] process > NFCORE_CUTANDRUN:CUTANDRUN:CONSENSUS_PEAKS:BEDTOOLS_MERGE (NSD3_sgNSD3_seacr) [100%] 120 of 120, cached: 120 ✔
[08/15f79d] process > NFCORE_CUTANDRUN:CUTANDRUN:CONSENSUS_PEAKS:AWK (H3K36me3_sgControl_seacr) [100%] 120 of 120, cached: 100 ✔
[be/dd10df] process > NFCORE_CUTANDRUN:CUTANDRUN:CONTROL_POOLING_FALLBACKS_REPORT [100%] 1 of 1, cached: 1 ✔
[6a/b171b6] process > NFCORE_CUTANDRUN:CUTANDRUN:IGV_SESSION (igv) [100%] 1 of 1 ✔
[d8/e01008] process > NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_QC:DEEPTOOLS_MULTIBAMSUMMARY (all_target_bams) [100%] 1 of 1, cached: 1 ✔
[10/edca2a] process > NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_QC:DEEPTOOLS_PLOTCORRELATION (all_target_bams) [100%] 1 of 1, cached: 1 ✔
[57/b6782d] process > NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_QC:DEEPTOOLS_PLOTPCA (all_target_bams) [100%] 1 of 1, cached: 1 ✔
[44/16cd1b] process > NFCORE_CUTANDRUN:CUTANDRUN:DEEPTOOLS_QC:DEEPTOOLS_PLOTFINGERPRINT (NSD3_sgNSD3_rep2) [100%] 28 of 28, cached: 28 ✔
[41/427473] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_FRAGMENTS:SAMTOOLS_SORT (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[00/3c9e79] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_FRAGMENTS:BEDTOOLS_BAMTOBED (NSD3_sgNSD3_rep2) [100%] 24 of 24, cached: 24 ✔
[f0/f064b3] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_FRAGMENTS:AWK (NSD3_sgNSD3_rep1) [100%] 24 of 24, cached: 24 ✔
[04/6fe20c] process > NFCORE_CUTANDRUN:CUTANDRUN:EXTRACT_FRAGMENTS:CUT (NSD3_sgNSD3_rep1) [100%] 24 of 24, cached: 24 ✔
[c4/8fd9c0] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PEAK_FRIP (NSD3_sgNSD3_rep2) [100%] 240 of 240, cached: 120 ✔
[e7/6ee3af] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PRIMARY_PEAK_COUNTS (NSD3_sgNSD3_rep1) [100%] 240 of 240, cached: 240 ✔
[89/1f6585] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:CONSENSUS_PEAK_COUNTS (H3K36me3_sgControl_seacr) [100%] 120 of 120, cached: 90 ✔
[69/3e2cd4] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:CUT_CALC_REPROD (NSD3_sgControl_rep2) [100%] 240 of 240, cached: 240 ✔
[87/ea2798] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PEAKQC_BEDTOOLS_SORT (NSD3_sgControl_rep2) [100%] 240 of 240, cached: 240 ✔
[27/ad10fa] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:BEDTOOLS_INTERSECT (NSD3_sgControl_rep2) [100%] 240 of 240, cached: 156 ✔
[f6/ee82ab] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:CALCULATE_PEAK_REPROD (NSD3_sgControl_rep2) [100%] 240 of 240 ✔
[9b/641e70] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PEAK_QC_FRIP_REPORT (peak_frip_scores) [100%] 1 of 1 ✔
[32/1434cb] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PEAK_QC_COUNTS_REPORT (peak_counts) [100%] 1 of 1 ✔
[30/9b2535] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PEAK_QC_CONSENSUS_REPORT (consensus_peak_counts) [100%] 1 of 1 ✔
[fa/228ed0] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PEAK_QC_REPROD_REPORT (peak_reproducibility) [100%] 1 of 1 ✔
[cc/ffc8a3] process > NFCORE_CUTANDRUN:CUTANDRUN:PEAK_QC:PLOT_CONSENSUS_PEAKS (10) [100%] 10 of 10, cached: 4 ✔
[80/1adfa1] process > NFCORE_CUTANDRUN:CUTANDRUN:SAMTOOLS_CUSTOMVIEW (NSD3_sgNSD3_rep1) [100%] 24 of 24, cached: 24 ✔
[2d/af112a] process > NFCORE_CUTANDRUN:CUTANDRUN:FRAG_LEN_HIST [100%] 2 of 2, failed: 1, retries: 1 ✔
[fb/2a4d5c] process > NFCORE_CUTANDRUN:CUTANDRUN:CUSTOM_DUMPSOFTWAREVERSIONS (1) [100%] 1 of 1 ✔
[94/bbf059] process > NFCORE_CUTANDRUN:CUTANDRUN:MULTIQC (1) [100%] 1 of 1 ✔
-[nf-core/cutandrun] Sent summary e-mail to dhusmann@stanford.edu (sendmail)-
-[nf-core/cutandrun] Pipeline completed successfully-
Completed at: 21-Jan-2026 00:37:21
Duration : 37m 54s
CPU hours : 377.8 (98.6% cached, 0.1% failed)
Succeeded : 508
Cached : 2'956
Failed : 1

@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: f345f8e225

ℹ️ 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/cutandrun.nf
Comment on lines +759 to +763
def peaks_list = row[2]
def bigwig = row[1]
peaks_list.collect { peak_meta, bed ->
def sample_id = peak_meta.sample_id ?: peak_meta.id
def heatmap_meta = peak_meta + [id: "${sample_id}_${peak_meta.caller}"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fix tuple destructuring in peaks_list.collect

In this block peaks_list is a Groovy List of [meta, bed] tuples from groupTuple, but List.collect passes each element as a single argument. With peaks_list.collect { peak_meta, bed -> ... }, peak_meta becomes the whole list and bed is null (or an index), so peak_meta.sample_id will throw a MissingPropertyException at runtime. This will break the heatmap path whenever run_deeptools_heatmaps is enabled. Explicitly destructure the tuple (e.g. def (peak_meta, bed) = it) before accessing sample_id.

Useful? React with 👍 / 👎.

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