Fix container volume mounts

This commit is contained in:
jasmezz 2022-04-26 16:28:39 +02:00
parent 6467e23809
commit 1acde9a7a1
4 changed files with 137 additions and 26 deletions

View file

@ -7,9 +7,20 @@ process ANTISMASH_ANTISMASHLITE {
'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' :
'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }"
containerOptions {
workflow.containerEngine == 'singularity' ?
"-B $css_dir:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css,$detection_dir:/usr/local/lib/python3.8/site-packages/antismash/detection,$modules_dir:/usr/local/lib/python3.8/site-packages/antismash/modules" :
workflow.containerEngine == 'docker' ?
"-v \$PWD/$css_dir:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css -v \$PWD/$detection_dir:/usr/local/lib/python3.8/site-packages/antismash/detection -v \$PWD/$modules_dir:/usr/local/lib/python3.8/site-packages/antismash/modules" :
''
}
input:
tuple val(meta), path(sequence_input)
path(databases)
path css_dir
path detection_dir
path modules_dir
output:
tuple val(meta), path("${prefix}/clusterblast/*_c*.txt") , optional: true, emit: clusterblast_file
@ -42,13 +53,13 @@ process ANTISMASH_ANTISMASHLITE {
## We specifically do not include annotations (--genefinding-tool none) as
## this should be run as a separate module for versioning purposes
antismash \\
$sequence_input \\
$args \\
-c $task.cpus \\
--output-dir $prefix \\
--genefinding-tool none \\
--logfile $prefix/${prefix}.log \\
--databases $databases
--databases $databases \\
$sequence_input
cat <<-END_VERSIONS > versions.yml
"${task.process}":

View file

@ -37,6 +37,21 @@ input:
type: directory
description: downloaded antismash databases e.g. data/databases
pattern: "*"
- css_dir:
type: directory
description: |
antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use 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.
pattern: "css"
- detection_dir:
type: directory
description: |
antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use 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.
pattern: "detection"
- modules_dir:
type: directory
description: |
antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use 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.
pattern: "modules"
output:
- meta:

View file

@ -2,7 +2,7 @@
nextflow.enable.dsl = 2
//include { GUNZIP } from '../../../modules/gunzip/main.nf'
include { GUNZIP } from '../../../modules/gunzip/main.nf'
include { UNTAR as UNTAR1 } from '../../../../modules/untar/main.nf'
include { UNTAR as UNTAR2 } from '../../../../modules/untar/main.nf'
include { UNTAR as UNTAR3 } from '../../../../modules/untar/main.nf'
@ -10,40 +10,57 @@ include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../modules/anti
include { ANTISMASH_ANTISMASHLITE } from '../../../../modules/antismash/antismashlite/main.nf'
include { PROKKA } from '../../../modules/prokka/main.nf'
workflow test_antismashlite {
input = [
[ id:'test' ], // meta map
file(params.test_data['bacteroides_fragilis']['genome']['genome_gbff_gz'], checkIfExists: true) ]
// workflow test_antismashlite {
// input = [
// [ id:'test' ], // meta map
// file(params.test_data['bacteroides_fragilis']['genome']['genome_gbff_gz'], checkIfExists: true) ]
// input_antismash_db1 = [
// [],
// file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
// ]
// input_antismash_db2 = [
// [],
// file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
// ]
// input_antismash_db3 = [
// [],
// file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
// ]
// UNTAR1 ( input_antismash_db1 )
// UNTAR2 ( input_antismash_db2 )
// UNTAR3 ( input_antismash_db3 )
// ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } )
// ANTISMASH_ANTISMASHLITE ( input, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database, UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } )
//}
workflow test_prokka_antismashlite {
input_gunzip = [ [ id:'test' ], // meta map
file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ]
input_antismash_db1 = [
[],
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true)
]
input_antismash_db2 = [
input_antismash_db2 = [
[],
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true)
]
input_antismash_db3 = [
input_antismash_db3 = [
[],
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true)
]
GUNZIP ( input_gunzip )
PROKKA ( GUNZIP.out.gunzip, [], [] )
UNTAR1 ( input_antismash_db1 )
UNTAR2 ( input_antismash_db2 )
UNTAR3 ( input_antismash_db3 )
ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } )
ANTISMASH_ANTISMASHLITE ( input, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database )
ANTISMASH_ANTISMASHLITE ( PROKKA.out.gbk, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database, UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } )
}
//workflow test_prokka_antismashlite {
// input_gunzip = [ [ id:'test' ], // meta map
// file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ]
// GUNZIP ( input_gunzip )
// PROKKA ( GUNZIP.out.gunzip, [], [] )
// ANTISMASHLITEDOWNLOADDATABASES ()
// ANTISMASH ( PROKKA.out.gbk )
// }

View file

@ -1,5 +1,5 @@
- name: antismash antismashlite test_antismashlite
command: nextflow run ./tests/modules/antismash/antismashlite -entry test_antismashlite -c tests/config/nextflow.config
command: nextflow run tests/modules/antismash/antismashlite -entry test_antismashlite -c tests/config/nextflow.config
tags:
- antismash/antismashlite
- antismash
@ -16,7 +16,7 @@
contains: ['{"version": "6.0.1", "input_file": "genome.gbff.gz", "records": [{"id": "NZ_CP069563.1", "seq": {"data":']
- path: output/antismash/test/genome.zip
- path: output/antismash/test/index.html
md5sum: 4792f0f4faf318035fbec5b4bf0ff76e
md5sum: 32aaf51315258af3b300d9a5bafd7bdc
- path: output/antismash/test/js/antismash.js
md5sum: 58e90c3d783ae014cc3d51849bcb50a2
- path: output/antismash/test/js/jquery.js
@ -30,8 +30,76 @@
- path: output/antismash/versions.yml
md5sum: 7151dfd4d39173338397b2dab50acf8e
- path: output/untar1/versions.yml
md5sum: 42c2c02eb6b5bc47b151bdd2c49bbb2d
md5sum: 1e4721017721c45370996318e6b807e5
- path: output/untar2/versions.yml
md5sum: 5a608b991b7d3e55cc43206939991a2d
md5sum: a6ae4977a432f3c5ef26687cec8622de
- path: output/untar3/versions.yml
md5sum: ec74401950e3820b7575840571a6f00c
md5sum: a5ee00c1c426ed601ff654891ba0f645
- name: antismash antismashlite test_prokka_antismashlite
command: nextflow run tests/modules/antismash/antismashlite -entry test_prokka_antismashlite -c tests/config/nextflow.config
tags:
- antismash
- antismash/antismashlite
files:
- path: output/antismash/test/NZ_CP069563.1.region001.gbk
contains: ['/tool="antismash"']
- path: output/antismash/test/NZ_CP069563.1.region002.gbk
contains: ['/tool="antismash"']
- path: output/antismash/test/css/bacteria.css
md5sum: 8b3c2f8b143d5245a5f42f55803c532c
- path: output/antismash/test/index.html
md5sum: 3773c3ec61fb1e8cd9a67791b37d9b79
- path: output/antismash/test/js/antismash.js
md5sum: 58e90c3d783ae014cc3d51849bcb50a2
- 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"' ]
- path: output/antismash/test/test.gbk
contains: ['/tool="antismash"']
- path: output/antismash/test/test.json
contains: ['"id": "NZ_CP069563.1"']
- path: output/antismash/test/test.log
contains: ['antiSMASH status: SUCCESS']
- path: output/antismash/test/test.zip
- path: output/antismash/versions.yml
md5sum: da6bed0032d0f7ad4741e0074ad6b1ff
- path: output/gunzip/genome.fna
md5sum: dafd38f5454b54fbea38245d773062a5
- path: output/gunzip/versions.yml
md5sum: 93ce587e93791c8cf500482d42b6069f
- path: output/prokka/test/test.err
md5sum: 194fd8a1d1cde9919841a1afd4414760
- path: output/prokka/test/test.faa
md5sum: 8fefbfa7860f280cc881c3a3b377d6da
- path: output/prokka/test/test.ffn
md5sum: 9c4d4d7dc28625bcb13c6fbd27ca13c3
- path: output/prokka/test/test.fna
md5sum: 96aa7707b864499745e8946f169ae8e0
- path: output/prokka/test/test.fsa
md5sum: dbe7d3d43d46920802d2aec5cd177ddc
- path: output/prokka/test/test.gbk
md5sum: 286ea011a64c0d281de3981ed2f296ff
- path: output/prokka/test/test.gff
md5sum: 9f733b702454e7750b7d4686369fe7e4
- path: output/prokka/test/test.log
contains: ["Annotation finished successfully."]
- path: output/prokka/test/test.sqn
md5sum: a901ac190675f976e373219f0191d067
- path: output/prokka/test/test.tbl
md5sum: 98f3b705f47b40255631ae43823e8271
- path: output/prokka/test/test.tsv
md5sum: 26e8aa4b2212f320e82b6db7c93d4461
- path: output/prokka/test/test.txt
md5sum: aea5834a64dff02d3588cecbe25c3914
- path: output/prokka/versions.yml
md5sum: 286ac10895a9f26ee8dd933dbc5d2b1c
- path: output/untar1/versions.yml
md5sum: 6c1bfedb010be6dfee273aa267b1cae3
- path: output/untar2/versions.yml
md5sum: 65db3fe9c809e5371158deae444fb343
- path: output/untar3/versions.yml
md5sum: 713d3aa0ee24ff680a8024cc53765d60