diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 856da02..b5ca4da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ variables: PYTEST_TESTS_PATH: "bin/workflow_glue/tests/common" RTEST_CONTAINER_NAME: "wf-transcriptomes-core" RTEST_CONTAINER_CONFIG_KEY: "container_sha" - WF_TEMPLATE_ENFORCEMENT_REF: "v6.1.0-rc1" + WF_TEMPLATE_ENFORCEMENT_REF: "v6.1.0-rc2" EKS_RUNNER_SIZE: "xlarge-highio" pytest_wfcontainer: diff --git a/CHANGELOG.md b/CHANGELOG.md index 883f32f..3364fb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Users of wf-transcriptomes v2.0.0 who have encountered issues during discovery a - "unable to find an inherited method for function 'rowData'" encountered during `runJointBambuDiscover` when providing many samples. The workflow now correctly handles data spilled to disk by bambu discover. - Volcano plot class counts incorrect when `log2FoldChange` or `padj` columns contained NA values. - Adjusted p-values below 0.001 in the volcano selection table are now shown in scientific notation instead of being rounded to 0.000. +- IGV track not correctly loading in EPI2ME Desktop when a sample consists of a single input BAM. ## [v2.0.0] diff --git a/lib/ingress.nf b/lib/ingress.nf index f10439f..8ff4d96 100644 --- a/lib/ingress.nf +++ b/lib/ingress.nf @@ -480,14 +480,15 @@ def xam_ingress(Map arguments, aln_ref_ch = null) output_xam_fmt, margs ) - // Update meta is unaligned + // Update meta for newly aligned inputs mm2_aln_final = mm2_aln.alignment.map{ meta, xam, xai, stats -> // remove alignment routing metadata that is no longer required def newmeta = meta.findAll { k, v -> !(k in ['has_reads', 'requires_alignment']) } - [newmeta + [is_unaligned: false], xam, xai, stats] + // flip is_unaligned marker and drop references to input xam + [newmeta + [is_unaligned: false, src_xam: null, src_xai: null], xam, xai, stats] } // Process BAM files that do not require realignment by passing them through the standard downstream steps (merging, sorting, indexing, etc.) ch_result_tmp = alignment_fork.noalign.map{ diff --git a/main.nf b/main.nf index 4824c89..6d8c966 100644 --- a/main.nf +++ b/main.nf @@ -177,8 +177,9 @@ workflow wf { .collect() // meta.src_xam is non-null if BAMs are "passed through" + // while meta.src_xai can be null if xam are provided without index generated_alignment_outputs = reads - .filter { meta, bam, bai, stats -> meta.src_xam == null } + .filter { meta, bam, bai, stats -> meta.src_xam == null || meta.src_xai == null } .flatMap { meta, bam, bai, stats -> def outdir = "samples/${meta.alias}/alignment" [ @@ -343,7 +344,6 @@ workflow { ] + ingress_args, ref_genome) } - sample_sheet_aliases = sample_sheet == OPTIONAL_FILE ? null : sample_sheet @@ -359,7 +359,6 @@ workflow { } } - analysis_samples = samples .filter { meta, xam, xai, stats -> boolean is_excluded = false @@ -387,7 +386,6 @@ workflow { } processed_samples = analysis_samples - pipeline_run = wf(processed_samples, sample_sheet, ref_genome, ref_annotation) results = pipeline_run.results @@ -417,11 +415,18 @@ workflow { .map { [ it[0], "reference" ] } igv_alignment_paths = processed_samples - .map { meta, bam, bai, stat -> [ - meta.src_xam ?: "${meta.alias},samples/${meta.alias}/alignment/reads.bam", - meta.src_xai ?: "${meta.alias},samples/${meta.alias}/alignment/reads.bam.bai" - ] } - .flatten() + .map { meta, bam, bai, stat -> + // Fall back to the published BAM/BAI pair whenever either source path is missing. + def use_published_alignment = (meta.src_xam == null || meta.src_xai == null) + [ + use_published_alignment + ? "${meta.alias},samples/${meta.alias}/alignment/reads.bam" + : "${meta.alias},${meta.src_xam}", + use_published_alignment + ? "${meta.alias},samples/${meta.alias}/alignment/reads.bam.bai" + : "${meta.alias},${meta.src_xai}", + ] + }.flatten() // convert [alias0, [bw00...bw0N]] to [alias0, bw00] ... [aliasN, bwNN] // allowing for [aliasM, bwM0] if only one bw is output because ... nextflow