Skip to content

Commit

Permalink
Merge branch 'master' into stringtie_update_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse authored Feb 12, 2024
2 parents 98367dd + a21faa6 commit d552ec2
Show file tree
Hide file tree
Showing 158 changed files with 4,739 additions and 907 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ jobs:
tags: merquryfk/merquryfk
- profile: conda
tags: merquryfk/ploidyplot
- profile: conda
tags: quartonotebook
- profile: conda
tags: sentieon/bwaindex
- profile: conda
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/antismash/antismashlite/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- bioconda::antismash-lite=6.1.1
- bioconda::antismash-lite=7.1.0
36 changes: 31 additions & 5 deletions modules/nf-core/antismash/antismashlite/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ process ANTISMASH_ANTISMASHLITE {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/antismash-lite:6.1.1--pyhdfd78af_0' :
'biocontainers/antismash-lite:6.1.1--pyhdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/antismash-lite:7.1.0--pyhdfd78af_0' :
'biocontainers/antismash-lite:7.1.0--pyhdfd78af_0' }"

containerOptions {
workflow.containerEngine == 'singularity' ?
"-B $antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" :
"-B $antismash_dir:/usr/local/lib/python3.10/site-packages/antismash" :
workflow.containerEngine == 'docker' ?
"-v \$PWD/$antismash_dir:/usr/local/lib/python3.8/site-packages/antismash" :
"-v \$PWD/$antismash_dir:/usr/local/lib/python3.10/site-packages/antismash" :
''
}

Expand Down Expand Up @@ -64,7 +64,33 @@ process ANTISMASH_ANTISMASHLITE {
cat <<-END_VERSIONS > versions.yml
"${task.process}":
antismash-lite: \$(antismash --version | sed 's/antiSMASH //')
antismash-lite: \$(echo \$(antismash --version) | sed 's/antiSMASH //')
END_VERSIONS
"""

stub:
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
def VERSION = '7.1.0' // WARN: Version information not provided by tool during stub run. Please update this string when bumping container versions.
"""
mkdir -p ${prefix}/css
mkdir ${prefix}/images
mkdir ${prefix}/js
touch ${prefix}/NZ_CP069563.1.region001.gbk
touch ${prefix}/NZ_CP069563.1.region002.gbk
touch ${prefix}/css/bacteria.css
touch ${prefix}/genome.gbk
touch ${prefix}/genome.json
touch ${prefix}/genome.zip
touch ${prefix}/images/about.svg
touch ${prefix}/index.html
touch ${prefix}/js/antismash.js
touch ${prefix}/js/jquery.js
touch ${prefix}/regions.js
touch ${prefix}/test.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
antismash-lite: $VERSION
END_VERSIONS
"""
}
2 changes: 1 addition & 1 deletion modules/nf-core/antismash/antismashlite/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tools:
documentation: "https://docs.antismash.secondarymetabolites.org"
tool_dev_url: "https://github.com/antismash/antismash"
doi: "10.1093/nar/gkab335"
licence: "['AGPL v3']"
licence: ["AGPL v3"]
input:
- meta:
type: map
Expand Down
126 changes: 126 additions & 0 deletions modules/nf-core/antismash/antismashlite/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
nextflow_process {

name "Test Process ANTISMASH_ANTISMASHLITE"
script "../main.nf"
process "ANTISMASH_ANTISMASHLITE"

tag "modules"
tag "modules_nfcore"
tag "antismash"
tag "antismash/antismashlite"
tag "antismash/antismashlitedownloaddatabases"
tag "gunzip"
tag "untar"

setup {
run("UNTAR", alias: "UNTAR_CSS") {
script "modules/nf-core/untar/main.nf"
process {
"""
input[0] = [
[ ],
file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
]
"""
}
}

run("UNTAR", alias: "UNTAR_DETECTION") {
script "modules/nf-core/untar/main.nf"
process {
"""
input[0] = [
[ ],
file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
]
"""
}
}

run("UNTAR", alias: "UNTAR_MODULES") {
script "modules/nf-core/untar/main.nf"
process {
"""
input[0] = [
[ ],
file('https://github.com/nf-core/test-datasets/raw/59ddeb5929f89ddddaff292d67f9025812762b87/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
]
"""
}
}

run("ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES") {
script "modules/nf-core/antismash/antismashlitedownloaddatabases"
process {
"""
input[0] = UNTAR_CSS.out.untar.map{ it[1] }
input[1] = UNTAR_DETECTION.out.untar.map{ it[1] }
input[2] = UNTAR_MODULES.out.untar.map{ it[1] }
"""
}
}

run("GUNZIP") {
script "modules/nf-core/gunzip/main.nf"
process {
"""
input[0] = [
[ id:'test' ],
file(params.test_data['bacteroides_fragilis']['genome']['genome_gbff_gz'], checkIfExists: true)
]
"""
}
}
}

test("antismashlite - bacteroides_fragilis - genome") {

when {
process {
"""
input[0] = GUNZIP.out.gunzip
input[1] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database
input[2] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir
input[3] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert path(process.out.gbk_results.get(0).get(1).get(0)).text.contains("##antiSMASH-Data-START##") },
{ assert snapshot(process.out.html_accessory_files).match("html_accessory_files") },
{ assert path(process.out.gbk_input.get(0).get(1).get(0)).text.contains("##antiSMASH-Data-END##") },
{ assert path(process.out.zip.get(0).get(1)).exists() },
{ assert path(process.out.html.get(0).get(1)).text.contains("https://antismash.secondarymetabolites.org/") },
{ assert path(process.out.json_sideloading.get(0).get(1)).text.contains("\"seq_id\": \"NZ_CP069563.1\"") },
{ assert path(process.out.log.get(0).get(1)).text.contains("antiSMASH status: SUCCESS") },
{ assert snapshot(process.out.versions).match("versions") }
)
}
}

test("antismashlite - bacteroides_fragilis - genome - stub") {

options "-stub"

when {
process {
"""
input[0] = GUNZIP.out.gunzip
input[1] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database
input[2] = ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir
input[3] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}
}
Loading

0 comments on commit d552ec2

Please sign in to comment.