Skip to content

Commit

Permalink
Update bracken (nf-core#1982)
Browse files Browse the repository at this point in the history
* chore: update version

* tests: update use of kraken2 module
  • Loading branch information
Midnighter authored and matthdsm committed Sep 5, 2022
1 parent d5bc3d2 commit aa68797
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
14 changes: 9 additions & 5 deletions modules/bracken/bracken/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ process BRACKEN_BRACKEN {
tag "$meta.id"
label 'process_low'

conda (params.enable_conda ? "bioconda::bracken=2.6.2" : null)
// WARN: Version information not provided by tool on CLI.
// Please update version string below when bumping container versions.
conda (params.enable_conda ? "bioconda::bracken=2.7" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bracken:2.6.2--py39hc16433a_0':
'quay.io/biocontainers/bracken:2.6.2--py39hc16433a_0' }"
'https://depot.galaxyproject.org/singularity/bracken:2.7--py39hc16433a_0':
'quay.io/biocontainers/bracken:2.7--py39hc16433a_0' }"

input:
tuple val(meta), path(kraken_report)
Expand All @@ -24,8 +26,10 @@ process BRACKEN_BRACKEN {
def read_length = meta.read_length ?: 150
def args = task.ext.args ?: "-l ${taxonomic_level} -t ${threshold} -r ${read_length}"
def prefix = task.ext.prefix ?: "${meta.id}"
def bracken_version = '2.6.2'
bracken_report = "${prefix}_${taxonomic_level}.tsv"
// WARN: Version information not provided by tool on CLI.
// Please update version string below when bumping container versions.
def VERSION = '2.7'
"""
bracken \\
${args} \\
Expand All @@ -35,7 +39,7 @@ process BRACKEN_BRACKEN {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bracken: ${bracken_version}
bracken: ${VERSION}
END_VERSIONS
"""
}
16 changes: 8 additions & 8 deletions tests/modules/bracken/bracken/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ workflow test_bracken_bracken_single_end_default_args {

ch_db = UNTAR ( [[:], db] ).untar
.map { it[1] }
KRAKEN2_KRAKEN2 ( input, ch_db )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db )
KRAKEN2_KRAKEN2 ( input, ch_db, false, false )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.report, ch_db )
}

workflow test_bracken_bracken_single_end_custom_args {
Expand All @@ -26,8 +26,8 @@ workflow test_bracken_bracken_single_end_custom_args {

ch_db = UNTAR ( [[:], db] ).untar
.map { it[1] }
KRAKEN2_KRAKEN2 ( input, ch_db )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db )
KRAKEN2_KRAKEN2 ( input, ch_db, false, false )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.report, ch_db )
}

workflow test_bracken_bracken_paired_end_default_args {
Expand All @@ -39,8 +39,8 @@ workflow test_bracken_bracken_paired_end_default_args {

ch_db = UNTAR ( [[:], db] ).untar
.map { it[1] }
KRAKEN2_KRAKEN2 ( input, ch_db )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db )
KRAKEN2_KRAKEN2 ( input, ch_db, false, false )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.report, ch_db )
}

workflow test_bracken_bracken_paired_end_custom_args {
Expand All @@ -52,6 +52,6 @@ workflow test_bracken_bracken_paired_end_custom_args {

ch_db = UNTAR ( [[:], db] ).untar
.map { it[1] }
KRAKEN2_KRAKEN2 ( input, ch_db )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.txt, ch_db )
KRAKEN2_KRAKEN2 ( input, ch_db, false, false )
BRACKEN_BRACKEN ( KRAKEN2_KRAKEN2.out.report, ch_db )
}
8 changes: 4 additions & 4 deletions tests/modules/bracken/bracken/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- path: output/bracken/test_S.tsv
md5sum: 4a21ae14ff8a0311d55f139af5247838
- path: output/bracken/versions.yml
md5sum: ab8b1550f84a99bae80f050fe718abd0
md5sum: e0abdac999c0d58becd8c868dd12028b

- name: bracken bracken test_bracken_bracken_single_end_custom_args
command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_single_end_custom_args -c tests/config/nextflow.config
Expand All @@ -18,7 +18,7 @@
- path: output/bracken/test_G.tsv
md5sum: f609b09d6edb5ebc1ea1435d1dd46cde
- path: output/bracken/versions.yml
md5sum: af87e8d4c42fbcb0469ab13912b8a9bd
md5sum: 7d0a1629ece197a8062271d39ed8ef74

- name: bracken bracken test_bracken_bracken_paired_end_default_args
command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_paired_end_default_args -c tests/config/nextflow.config
Expand All @@ -29,7 +29,7 @@
- path: output/bracken/test_S.tsv
md5sum: 4a21ae14ff8a0311d55f139af5247838
- path: output/bracken/versions.yml
md5sum: 4602111eb25bd19a7f9d725acc5921f6
md5sum: 7b58898d0b9cce1ca170ac5a82d8ecf1

- name: bracken bracken test_bracken_bracken_paired_end_custom_args
command: nextflow run tests/modules/bracken/bracken -entry test_bracken_bracken_paired_end_custom_args -c tests/config/nextflow.config
Expand All @@ -40,4 +40,4 @@
- path: output/bracken/test_G.tsv
md5sum: f609b09d6edb5ebc1ea1435d1dd46cde
- path: output/bracken/versions.yml
md5sum: d4618b01df5ac09cc366fe2ae7c13f06
md5sum: 3c9160394af663ae7808c0f77fcedae8

0 comments on commit aa68797

Please sign in to comment.