Skip to content

Commit

Permalink
Merge pull request #110 from nf-core/dev
Browse files Browse the repository at this point in the history
Dev -> Master for 2.1.1 release
  • Loading branch information
edmundmiller authored Feb 17, 2023
2 parents 12e9ba6 + d8e2684 commit 9ff33c7
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
12 changes: 8 additions & 4 deletions subworkflows/local/prepare_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
32 changes: 32 additions & 0 deletions tests/pipeline/references.nf.test
Original file line number Diff line number Diff line change
@@ -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()
}

}

}
8 changes: 8 additions & 0 deletions tests/pipeline/references.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Should work with BWA Index": {
"content": [
128
],
"timestamp": "2023-02-16T23:30:58+0000"
}
}
5 changes: 5 additions & 0 deletions tests/pipeline/skip_pints.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: PINTS_CALLER {
ext.when = false
}
}

0 comments on commit 9ff33c7

Please sign in to comment.