diff --git a/CHANGELOG.md b/CHANGELOG.md index f9e26951..e2cc5d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v2.1.1 - 2023-02-17 + +### Fixed + +- [[#109](https://github.com/nf-core/nascent/pull/109)] - Fixed bug where using AWS igenomes or passing a pre-made index fails because of an update to the module expects them to have a metamap. Generation was still working. + ## v2.1.0 - 2023-02-15 ### Added diff --git a/nextflow.config b/nextflow.config index 658257d8..65f5714a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -215,7 +215,7 @@ manifest { description = """Global Run-On sequencing analysis pipeline""" mainScript = 'main.nf' nextflowVersion = '!>=22.10.1' - version = '2.1.0' + version = '2.1.1' doi = '10.5281/zenodo.7245273' } diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index 95e9e073..c9dde232 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -88,13 +88,15 @@ workflow PREPARE_GENOME { // ch_bwa_index = Channel.empty() ch_dragmap = Channel.empty() + // TODO Turn this into a switch if ('bwa' in prepare_tool_indices) { if (params.bwa_index) { if (params.bwa_index.endsWith('.tar.gz')) { ch_bwa_index = UNTAR_BWA_INDEX ( params.bwa_index ).untar ch_versions = ch_versions.mix(UNTAR_BWA_INDEX.out.versions) } else { - ch_bwa_index = file(params.bwa_index) + // TODO Give the meta from basename or genome? + ch_bwa_index = [ [meta: "Genome"], file(params.bwa_index) ] } } else { ch_bwa_index = BWA_INDEX ( [ [:], ch_fasta ] ).index @@ -106,7 +108,8 @@ workflow PREPARE_GENOME { ch_bwa_index = UNTAR_BWA_INDEX ( [ [:], params.bwamem2_index ] ).untar ch_versions = ch_versions.mix(UNTAR_BWA_INDEX.out.versions) } else { - ch_bwa_index = file(params.bwamem2_index) + // TODO Give the meta from basename or genome? + ch_bwa_index = [ [meta: "Genome"], file(params.bwamem2_index) ] } } else { ch_bwa_index = BWAMEM2_INDEX ( [ [:], ch_fasta ] ).index @@ -115,10 +118,11 @@ workflow PREPARE_GENOME { } else if ('dragmap' in prepare_tool_indices) { if (params.dragmap) { if (params.dragmap.endsWith('.tar.gz')) { - ch_bwa_index = UNTAR_DRAGMAP_INDEX ( params.dragmap ).untar + ch_dragmap = UNTAR_DRAGMAP_INDEX ( params.dragmap ).untar ch_versions = ch_versions.mix(UNTAR_DRAGMAP_INDEX.out.versions) } else { - ch_bwa_index = file(params.dragmap) + // TODO Give the meta from basename or genome? + ch_dragmap = [ [meta: "Genome"], file(params.dragmap) ] } } else { ch_dragmap = DRAGMAP_HASHTABLE( [ [:], ch_fasta ] ).hashmap diff --git a/tests/pipeline/references.nf.test b/tests/pipeline/references.nf.test new file mode 100644 index 00000000..ae4cd8d4 --- /dev/null +++ b/tests/pipeline/references.nf.test @@ -0,0 +1,32 @@ +def igenomes_base = 's3://ngi-igenomes/igenomes' + +nextflow_pipeline { + + name "Test passing references" + script "main.nf" + + // https://github.com/nf-core/nascent/issues/106 + test("Should work with BWA Index") { + // FIXME PINTS Fails because it doesn't find anything. + config 'tests/pipeline/skip_pints.config' + when { + params { + outdir = "$outputDir" + aligner = "bwa" + // TODO Update these to human + bwa_index = "${igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/BWAIndex/version0.6.0/" + fasta = "${igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/WholeGenomeFasta/genome.fa" + gtf = "${igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Annotation/Genes/genes.gtf" + } + } + + then { + assert workflow.success + assert snapshot( + workflow.trace.tasks().size(), + ).match() + } + + } + +} diff --git a/tests/pipeline/references.nf.test.snap b/tests/pipeline/references.nf.test.snap new file mode 100644 index 00000000..d03c907d --- /dev/null +++ b/tests/pipeline/references.nf.test.snap @@ -0,0 +1,8 @@ +{ + "Should work with BWA Index": { + "content": [ + 128 + ], + "timestamp": "2023-02-16T23:30:58+0000" + } +} \ No newline at end of file diff --git a/tests/pipeline/skip_pints.config b/tests/pipeline/skip_pints.config new file mode 100644 index 00000000..a3d80f05 --- /dev/null +++ b/tests/pipeline/skip_pints.config @@ -0,0 +1,5 @@ +process { + withName: PINTS_CALLER { + ext.when = false + } +}