From f5e5f3a790cdfabf346c34bcb31c16800f40552f Mon Sep 17 00:00:00 2001 From: Kiah McIntosh Date: Fri, 22 May 2026 09:12:26 +0000 Subject: [PATCH] Alignment outputs in per sample folder [CW-7270] --- .gitlab-ci.yml | 2 +- README.md | 6 +++--- docs/08_outputs.md | 6 +++--- main.nf | 6 +++--- output_definition.json | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c196ad6..372951e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -158,7 +158,7 @@ docker-run: NF_BEFORE_SCRIPT: ":" NF_WORKFLOW_OPTS: "--fastq test_data/smoke/reads.fastq --sample sampleA --ref_genome test_data/smoke/reference.fa --ref_annotation test_data/smoke/annotation.gtf --direct_rna" AFTER_NEXTFLOW_CMD: > - test -f ${CI_PROJECT_NAME}/cohort/alignments/sampleA/reads.bam && + test -f ${CI_PROJECT_NAME}/samples/sampleA/alignment/reads.bam && test -f ${CI_PROJECT_NAME}/samples/sampleA/sampleA_sqanti/classification_summary.tsv # Smoke: end-to-end DE/DTU wiring and expected contrast output files. diff --git a/README.md b/README.md index 0696c51..f64cc96 100644 --- a/README.md +++ b/README.md @@ -366,9 +366,9 @@ Output files may be aggregated including information for all samples or provided | Per-read stats | ingress_results/{{ alias }}/fastcat_stats/per-read-stats.tsv.gz | Read statistics for individual reads in a sample, when this output is enabled. | per-sample | | Ingress reads | ingress_results/{{ alias }}/seqs.fastq.gz | Reads prepared from the input data for downstream analysis. | per-sample | | Ingress metadata | ingress_results/{{ alias }}/metamap.json | Per-sample metadata used by the workflow. | per-sample | -| Aligned BAM | cohort/alignments/{{ alias }}/reads.bam | Genome-aligned BAM used for bambu, optional SQANTI3 QC, and IGV. | per-sample | -| Aligned BAM index | cohort/alignments/{{ alias }}/reads.bam.bai | Index for the aligned BAM. | per-sample | -| Alignment summary | cohort/alignments/{{ alias }}/bamstats.flagstat.tsv | bamstats flagstat summary for the aligned BAM. | per-sample | +| Aligned BAM | samples/{{ alias }}/alignment/reads.bam | Genome-aligned BAM used for bambu, optional SQANTI3 QC, and IGV. | per-sample | +| Aligned BAM index | samples/{{ alias }}/alignment/reads.bam.bai | Index for the aligned BAM. | per-sample | +| Alignment summary | samples/{{ alias }}/alignment/bamstats.flagstat.tsv | bamstats flagstat summary for the aligned BAM. | per-sample | | Reference and annotation preparation summary | cohort/reference/annotation_reference_summary.json | Summary of reference and annotation preparation, including seqname overlap, build/provider hints, and excluded unstranded annotation counts. | aggregated | | Excluded unstranded annotation records | cohort/reference/unstranded_annotation.gtf | Full set of annotation records excluded because their strand was not '+' or '-'. Present only when unstranded records are found. | aggregated | | Cohort transcriptome GTF | cohort/transcripts.gtf | Joint bambu transcript model used as the primary cohort transcriptome. | aggregated | diff --git a/docs/08_outputs.md b/docs/08_outputs.md index e7ec9ae..6cd49e9 100644 --- a/docs/08_outputs.md +++ b/docs/08_outputs.md @@ -7,9 +7,9 @@ Output files may be aggregated including information for all samples or provided | Per-read stats | ingress_results/{{ alias }}/fastcat_stats/per-read-stats.tsv.gz | Read statistics for individual reads in a sample, when this output is enabled. | per-sample | | Ingress reads | ingress_results/{{ alias }}/seqs.fastq.gz | Reads prepared from the input data for downstream analysis. | per-sample | | Ingress metadata | ingress_results/{{ alias }}/metamap.json | Per-sample metadata used by the workflow. | per-sample | -| Aligned BAM | cohort/alignments/{{ alias }}/reads.bam | Genome-aligned BAM used for bambu, optional SQANTI3 QC, and IGV. | per-sample | -| Aligned BAM index | cohort/alignments/{{ alias }}/reads.bam.bai | Index for the aligned BAM. | per-sample | -| Alignment summary | cohort/alignments/{{ alias }}/bamstats.flagstat.tsv | bamstats flagstat summary for the aligned BAM. | per-sample | +| Aligned BAM | samples/{{ alias }}/alignment/reads.bam | Genome-aligned BAM used for bambu, optional SQANTI3 QC, and IGV. | per-sample | +| Aligned BAM index | samples/{{ alias }}/alignment/reads.bam.bai | Index for the aligned BAM. | per-sample | +| Alignment summary | samples/{{ alias }}/alignment/bamstats.flagstat.tsv | bamstats flagstat summary for the aligned BAM. | per-sample | | Reference and annotation preparation summary | cohort/reference/annotation_reference_summary.json | Summary of reference and annotation preparation, including seqname overlap, build/provider hints, and excluded unstranded annotation counts. | aggregated | | Excluded unstranded annotation records | cohort/reference/unstranded_annotation.gtf | Full set of annotation records excluded because their strand was not '+' or '-'. Present only when unstranded records are found. | aggregated | | Cohort transcriptome GTF | cohort/transcripts.gtf | Joint bambu transcript model used as the primary cohort transcriptome. | aggregated | diff --git a/main.nf b/main.nf index 66d288c..e3a50b3 100644 --- a/main.nf +++ b/main.nf @@ -186,7 +186,7 @@ workflow pipeline { generated_alignment_outputs = reads .filter { meta, bam, bai, stats -> meta.src_xam == null } .flatMap { meta, bam, bai, stats -> - def outdir = "cohort/alignments/${meta.alias}" + def outdir = "samples/${meta.alias}/alignment" [ [bam, outdir], [bai, outdir], @@ -344,8 +344,8 @@ workflow { igv_alignment_paths = processed_samples .map { meta, bam, bai, stat -> [ - meta.src_xam ?: "${meta.alias},cohort/alignments/${meta.alias}/reads.bam", - meta.src_xai ?: "${meta.alias},cohort/alignments/${meta.alias}/reads.bam.bai" + meta.src_xam ?: "${meta.alias},samples/${meta.alias}/alignment/reads.bam", + meta.src_xai ?: "${meta.alias},samples/${meta.alias}/alignment/reads.bam.bai" ] } .flatten() diff --git a/output_definition.json b/output_definition.json index 31b3120..c654378 100644 --- a/output_definition.json +++ b/output_definition.json @@ -41,7 +41,7 @@ "type": "per-sample" }, "sample-bam": { - "filepath": "cohort/alignments/{{ alias }}/reads.bam", + "filepath": "samples/{{ alias }}/alignment/reads.bam", "title": "Aligned BAM", "description": "Genome-aligned BAM used for bambu, optional SQANTI3 QC, and IGV.", "mime-type": "application/gzip", @@ -49,7 +49,7 @@ "type": "per-sample" }, "sample-bai": { - "filepath": "cohort/alignments/{{ alias }}/reads.bam.bai", + "filepath": "samples/{{ alias }}/alignment/reads.bam.bai", "title": "Aligned BAM index", "description": "Index for the aligned BAM.", "mime-type": "application/octet-stream", @@ -57,7 +57,7 @@ "type": "per-sample" }, "sample-flagstat": { - "filepath": "cohort/alignments/{{ alias }}/bamstats.flagstat.tsv", + "filepath": "samples/{{ alias }}/alignment/bamstats.flagstat.tsv", "title": "Alignment summary", "description": "bamstats flagstat summary for the aligned BAM.", "mime-type": "text/tab-separated-values",