Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ANTISMASH to 6.1.1 and enable_conda replacement #2688

Merged
merged 10 commits into from
Dec 21, 2022
6 changes: 3 additions & 3 deletions modules/nf-core/antismash/antismashlite/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process ANTISMASH_ANTISMASHLITE {
tag "$meta.id"
label 'process_medium'

conda "bioconda::antismash-lite=6.0.1"
conda "bioconda::antismash-lite=6.1.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' :
'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }"
'https://depot.galaxyproject.org/singularity/antismash-lite:6.1.1--pyhdfd78af_0' :
'quay.io/biocontainers/antismash-lite:6.1.1--pyhdfd78af_0' }"

containerOptions {
workflow.containerEngine == 'singularity' ?
Expand Down
32 changes: 22 additions & 10 deletions modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES {
label 'process_single'

conda "bioconda::antismash-lite=6.0.1"
conda "bioconda::antismash-lite=6.1.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' :
'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }"
'https://depot.galaxyproject.org/singularity/antismash-lite:6.1.1--pyhdfd78af_0' :
'quay.io/biocontainers/antismash-lite:6.1.1--pyhdfd78af_0' }"

/*
These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH.
Expand Down Expand Up @@ -35,18 +35,30 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES {

script:
def args = task.ext.args ?: ''
conda = params.enable_conda
cp_cmd = session.config.conda.enabled ? "cp -r \$(python -c 'import antismash;print(antismash.__file__.split(\"/__\")[0])') antismash_dir;" : "cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir;"
"""
download-antismash-databases \\
--database-dir antismash_db \\
$args

if [[ $conda = false ]]; \
then \
cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir; \
else \
cp -r \$(python -c 'import antismash;print(antismash.__file__.split("/__")[0])') antismash_dir; \
fi
$cp_cmd

cat <<-END_VERSIONS > versions.yml
"${task.process}":
antismash-lite: \$(antismash --version | sed 's/antiSMASH //')
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
cp_cmd = session.config.conda.enabled ? "cp -r \$(python -c 'import antismash;print(antismash.__file__.split(\"/__\")[0])') antismash_dir;" : "cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir;"
"""
echo "download-antismash-databases --database-dir antismash_db $args"

echo "$cp_cmd"

mkdir antismash_dir
mkdir antismash_db

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: antismash_antismashlitedownloaddatabases
description: antiSMASH allows the rapid genome-wide identification, annotation and analysis of secondary metabolite biosynthesis gene clusters. This module downloads the antiSMASH databases.
description: antiSMASH allows the rapid genome-wide identification, annotation and analysis of secondary metabolite biosynthesis gene clusters. This module downloads the antiSMASH databases for conda and docker/singularity runs.
keywords:
- secondary metabolites
- BGC
Expand Down
7 changes: 4 additions & 3 deletions tests/modules/nf-core/antismash/antismashlite/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ workflow test_antismashlite {
file(params.test_data['bacteroides_fragilis']['genome']['genome_gff_gz'], checkIfExists: true)
]

// hash 91bb8781c576967e23d2c5315dd4d43213575033 is for antismash version 6.1.1
antismash_css = [
[],
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
]

antismash_detection = [
[],
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
]

antismash_modules = [
[],
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
]

GUNZIP1 ( genome_fna )
Expand Down
94 changes: 78 additions & 16 deletions tests/modules/nf-core/antismash/antismashlite/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,97 @@
- name: antismash antismashlite test_antismashlite
command: nextflow run ./tests/modules/nf-core/antismash/antismashlite -entry test_antismashlite -c ./tests/config/nextflow.config
command: nextflow run ./tests/modules/nf-core/antismash/antismashlite -entry test_antismashlite -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/antismash/antismashlite/nextflow.config
tags:
- antismash/antismashlite
- antismash
- antismash/antismashlite
files:
- path: output/antismash/test/NZ_CP069563.1.region001.gbk
contains: ['/tool="antismash"']
contains:
- "##antiSMASH-Data-END##"
- path: output/antismash/test/NZ_CP069563.1.region002.gbk
contains: ['/tool="antismash"']
contains:
- "##antiSMASH-Data-END##"
- path: output/antismash/test/css/bacteria.css
md5sum: 8b3c2f8b143d5245a5f42f55803c532c
md5sum: d9c34889e2a676442ad5301d88b1b425
- path: output/antismash/test/genome.gbk
contains: ['/tool="antismash"']
contains:
- "##antiSMASH-Data-END##"
- path: output/antismash/test/genome.json
contains: ['{"version": "6.0.1", "input_file": "genome.fna", "records": [{"id": "NZ_CP069563.1", "seq": {"data":']
contains:
- "genome.fna"
- "records"
- path: output/antismash/test/genome.zip
- path: output/antismash/test/images/about.svg
md5sum: 2573f954dd506e2d0878daed04f5420a
- path: output/antismash/test/images/bacteria_about.png
md5sum: 99cdc2aa09aee37553b10ca86b172170
- path: output/antismash/test/images/bacteria_antismash_icon.svg
md5sum: 23a265b0e1cf293a4743fe13030b636f
- path: output/antismash/test/images/bacteria_antismash_logo.svg
md5sum: f80f639969ee6506571ffda2e197df93
- path: output/antismash/test/images/bacteria_antismash_white.svg
md5sum: 2c9da15cc168d8f796269d037b5e7f60
- path: output/antismash/test/images/bacteria_download.png
md5sum: c3428df1cf17cb97e2897ca6daa93d48
- path: output/antismash/test/images/bacteria_help.png
md5sum: 359b68f90c73208eb389759c0f5c1091
- path: output/antismash/test/images/bacteria_home.png
md5sum: 6595d97ee49d251fe038207f82012eff
- path: output/antismash/test/images/bacteria_logo.png
md5sum: 013f84d6dd93cde96f07084ff63d855c
- path: output/antismash/test/images/contact.svg
md5sum: 53b878c2af4f8a80a647ac30f61e6bf6
- path: output/antismash/test/images/download.svg
md5sum: 722038156f4ece46747cbf6908501974
- path: output/antismash/test/images/expand-arrows-alt-solid.svg
md5sum: 21b37749f54320135a455ed266a7fc3a
- path: output/antismash/test/images/external-link-alt-solid.svg
md5sum: ca337694c74e57f73d15ca9db30081ba
- path: output/antismash/test/images/fungi_about.png
md5sum: 4d55bf14df0340dca01a286487fa8448
- path: output/antismash/test/images/fungi_antismash_icon.svg
md5sum: 2acc19cc91d5d7285a72f0b3912e108a
- path: output/antismash/test/images/fungi_antismash_icon_white.svg
md5sum: 961f1c41e25036a625f115f209a961c7
- path: output/antismash/test/images/fungi_antismash_logo.svg
md5sum: 36560983a36f46786c98a05125b15724
- path: output/antismash/test/images/fungi_download.png
md5sum: 782580852674aab0b69b2b94a94c7615
- path: output/antismash/test/images/fungi_help.png
md5sum: 0ac06748f3177d150ab90997117c4f64
- path: output/antismash/test/images/fungi_home.png
md5sum: 880071898062d6dafe989ac73bb7bbea
- path: output/antismash/test/images/fungi_logo.png
md5sum: 29294392a3953fd1ba12d1a39cebaeeb
- path: output/antismash/test/images/help.svg
md5sum: e7565a3cd74893422f2886a0af748df2
- path: output/antismash/test/images/mail.png
md5sum: 049f51233b29663e4e4e4c8097c2d096
- path: output/antismash/test/images/minus-circle.svg
md5sum: b523305570d06b6e34cd7099bed22015
- path: output/antismash/test/images/nostructure_icon.png
md5sum: fc982a5b84a1a99db607731625a87f88
- path: output/antismash/test/images/plant_antismash_icon.svg
md5sum: e031de9570ef2809e52502481a5e77ea
- path: output/antismash/test/images/plant_antismash_icon_white.svg
md5sum: 10d25996b023dbdaed4a382471ab4877
- path: output/antismash/test/images/plus-circle.svg
md5sum: cba2cdd9ef893274f572228b354718cf
- path: output/antismash/test/images/question-circle-solid.svg
md5sum: 6dbc83547e29ecedc7f2a5b81354353b
- path: output/antismash/test/images/search-solid.svg
md5sum: aeab848c26357f3d120f3e58f1efa8f5
- path: output/antismash/test/index.html
md5sum: de787e865c3a1eec143a19d2facb4de4
md5sum: 471f04db1e7c6e055bc0892fe1f637a4
- path: output/antismash/test/js/antismash.js
md5sum: 58e90c3d783ae014cc3d51849bcb50a2
md5sum: 55a3f55e1eb5d6ab3fa73d867da12bbd
- path: output/antismash/test/js/jquery.js
md5sum: 397754ba49e9e0cf4e7c190da78dda05
- path: output/antismash/test/js/jquery.tablesorter.min.js
md5sum: 5e9e08cef4d1be0eaa538e6eb28809a7
- path: output/antismash/test/regions.js
contains: ['"seq_id": "NZ_CP069563.1"']
contains:
- '"seq_id": "NZ_CP069563.1"'
- path: output/antismash/test/test.log
contains: ["antiSMASH version: 6.0.1"]
contains:
- "antiSMASH status: SUCCESS"
- path: output/antismash/versions.yml
md5sum: 759431a43da33e2ef8e2d0ebd79a439b
- path: output/gunzip1/genome.fna
md5sum: dafd38f5454b54fbea38245d773062a5
- path: output/gunzip2/genome.gff
md5sum: 9b9c848b1946d43fa68128f4d6316052
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ include { UNTAR as UNTAR3 } from '../../../../../modules/nf-core/untar/main.nf'
include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../../../modules/nf-core/antismash/antismashlitedownloaddatabases/main.nf'

workflow test_antismash_antismashlitedownloaddatabases {
// hash 9d816b1327c5f73cd0113af0966197db1956c840 is additional files for for antismash-lite 6.0.1
input1 = [

// hash 91bb8781c576967e23d2c5315dd4d43213575033 is for antismash version 6.1.1
antismash_css = [
[],
file('https://github.com/nf-core/test-datasets/raw/9d816b1327c5f73cd0113af0966197db1956c840/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
]
input2 = [

antismash_detection = [
[],
file('https://github.com/nf-core/test-datasets/raw/9d816b1327c5f73cd0113af0966197db1956c840/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
]
input3 = [

antismash_modules = [
[],
file('https://github.com/nf-core/test-datasets/raw/9d816b1327c5f73cd0113af0966197db1956c840/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
file('https://github.com/nf-core/test-datasets/raw/91bb8781c576967e23d2c5315dd4d43213575033/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
]

UNTAR1 ( input1 )
UNTAR2 ( input2 )
UNTAR3 ( input3 )

UNTAR1 ( antismash_css )
UNTAR2 ( antismash_detection )
UNTAR3 ( antismash_modules )

ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } )
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
- antismash/antismashlitedownloaddatabases
- antismash
files:
- path: output/antismash/versions.yml
md5sum: 24859c67023abab99de295d3675a24b6
- path: output/antismash/antismash_db
- path: output/antismash/antismash_db/clusterblast
- path: output/antismash/antismash_db/clustercompare
Expand Down