From cdd98db9f0c707ea07e91e93c3644980d4544b85 Mon Sep 17 00:00:00 2001 From: ljwharbers Date: Wed, 2 Sep 2026 11:27:49 +0200 Subject: [PATCH] fix: address remaining PR #176 review comments Two nits from the Copilot review threads on #176 that were still real: - README: "a `multiqc` report from that combines" dropped the stray "from", and "one html report" -> "one HTML report". - LRSOMATICREPORT: quote the interpolated paths in the script block. The `Rscript` invocation passed report_src, the sample id, the sex and the output filename unquoted, so a projectDir or sample id containing a space would word-split; the flat-input symlink loop had the same shape. ${args} stays unquoted -- it is a pre-built argument string that already quotes each `--gene-panel` value in conf/modules.config. No output or version changes, so no snapshots move. Co-Authored-By: Claude Opus 5 --- README.md | 2 +- modules/local/lrsomaticreport/main.nf | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 27dd8d47..9c3f6b9d 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ IntGenomicsLab/lr_somatic was originally written by Luuk Harbers, Robert Forsyth ## Pipeline output -This pipeline produces a series of different output files. The main output is an aligned and phased tumour bam file. This bam file can be used by any typical downstream tool that uses bam files as input. Furthermore, we have sample-specific QC outputs from `cramino` (fastq), `cramino` (bam), `mosdepth`, `samtools` (stats/flagstat/idxstats), and optionally `fibertools`. Finally, we have a `multiqc` report from that combines the output from `mosdepth` and `samtools` into one html report, and a self-contained per-sample HTML report (`/report/_report.html`) covering small variants, structural variants, copy number and QC in one place — disable it with `--skip_report`. +This pipeline produces a series of different output files. The main output is an aligned and phased tumour bam file. This bam file can be used by any typical downstream tool that uses bam files as input. Furthermore, we have sample-specific QC outputs from `cramino` (fastq), `cramino` (bam), `mosdepth`, `samtools` (stats/flagstat/idxstats), and optionally `fibertools`. Finally, we have a `multiqc` report that combines the output from `mosdepth` and `samtools` into one HTML report, and a self-contained per-sample HTML report (`/report/_report.html`) covering small variants, structural variants, copy number and QC in one place — disable it with `--skip_report`. Besides QC and the aligned and phased bam file, we have output from (structural) variant and copy number callers, of which some are optional. The output from these variant callers can be found in their respective folders. For small and structural variant callers (`clairS`, `clairS-TO`, and `severus`) these will contain, among others, `vcf` files with called variants. For `ascat` these contain files with final copy number information and plots of the copy number profiles. diff --git a/modules/local/lrsomaticreport/main.nf b/modules/local/lrsomaticreport/main.nf index 1365f85c..1f4829bd 100644 --- a/modules/local/lrsomaticreport/main.nf +++ b/modules/local/lrsomaticreport/main.nf @@ -55,7 +55,7 @@ process LRSOMATICREPORT { // (*.segments_raw.txt, *.purityploidy.txt, the diagnostic PNGs). def flat_inputs = [vep_somatic, sv_vep, severus_vcf, ascat_files].flatten().findAll { f -> f } def link_flat = flat_inputs ? """ - for f in ${flat_inputs.join(' ')}; do ln -s "\$PWD/\$f" "sample_dir/\$f"; done + for f in ${flat_inputs.collect { f -> "\"${f}\"" }.join(' ')}; do ln -s "\$PWD/\$f" "sample_dir/\$f"; done """ : '' // The VAF/depth/phasing source is the exception: locate_outputs() looks for it at the @@ -110,12 +110,12 @@ process LRSOMATICREPORT { for f in wakhan/*; do ln -s "\$PWD/\$f" "sample_dir/wakhan/\$(basename "\$f")"; done fi - Rscript ${report_src}/bin/render_report.R \\ + Rscript "${report_src}/bin/render_report.R" \\ --sample-dir sample_dir \\ - --sample-id ${prefix} \\ - --sex ${sex} \\ + --sample-id "${prefix}" \\ + --sex "${sex}" \\ --reference auto \\ - --output ${prefix}_report.html \\ + --output "${prefix}_report.html" \\ ${args} """