Skip to content

Commit c8bd47a

Browse files
committed
Merge branch 'oncocnv-#7657' of github.com:nf-core/modules into oncocnv-#7657
2 parents 70ef096 + 72f8832 commit c8bd47a

File tree

57 files changed

+2298
-420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2298
-420
lines changed

modules/nf-core/antismash/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM quay.io/biocontainers/antismash:8.0.0--pyhdfd78af_0
2+
3+
## Speeds up slightly builds: https://github.com/antismash/antismash/issues/837#issuecomment-2893858536
4+
## From: https://github.com/antismash/containers/blob/main/standalone-lite/Dockerfile#L25
5+
RUN mkdir /matplotlib && MPLCONFIGDIR=/matplotlib python3 -c "import matplotlib.pyplot as plt" && chmod -R a+rw /matplotlib
6+
7+
# Download the antiSMASH database, needed for the prepare-data process
8+
# Prepare the antiSMASH cache and other bits it needs to run properly
9+
# Remove the databases to reduce the container size
10+
RUN download-antismash-databases && antismash --prepare-data && antismash --check-prereqs && rm -rf /usr/local/lib/python3.11/site-packages/antismash/databases
11+
12+
RUN python -c "from antismash.modules.nrps_pks import prepare_data; prepare_data()" && \
13+
cp /usr/local/lib/python3.11/site-packages/antismash/modules/nrps_pks/data/terminals/*.brawn_cache /usr/local/lib/python3.11/site-packages/antismash/modules/nrps_pks/data/
14+

modules/nf-core/antismash/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Updating the docker container and making a new module release
2+
3+
antiSMASH is an open source tool.
4+
The developers do provide two premade docker containers, one that contains a very large database and one that does not.
5+
The database containing version takes an extremely long time to pull as it's multiple gigabytes in size.
6+
While theoretically we could use the one without the database, and we would prefer to use a container that is sync with the conda recipe.
7+
8+
Unfortunately, the default biocontainer recipe does not work out of the box, as the tool requires caching information to be stored inside the installation directories of the tool.
9+
This caching procedure happens after database downloading, however the database does not fit on the bioconda/biocontainer CI nodes, thus the caching step cannot be executed.
10+
Therefore, when supplying an externally downloaded database to the container, the tool tries to update the cache locations inside the installation directories which thus fails as containers are read only.
11+
12+
Therefore, for docker and singularity containers, we need to create a new container based on the biocontainers container, however we locally download the database, generate the cache within the container, _but_ then remove the database before finishing the build.
13+
14+
_Thanks to @mberacochea for finding the solution and providing the Dockerfile below!_
15+
16+
Updating the antiSMASH version in the container and pushing the update to Dockerhub needs to be done manually.
17+
18+
1. Ensure the user that will push the container has access to the nf-core organization on Dockerhub.
19+
2. Change into the `modules/nf-core/antismash` directory:
20+
21+
```bash
22+
cd modules/nf-core/antismash
23+
```
24+
25+
3. Create and test the container:
26+
27+
```bash
28+
docker build . -t quay.io/nf-core/antismash:<version>
29+
```
30+
31+
4. Push the container to Quay:
32+
33+
```bash
34+
docker push quay.io/nf-core/antismash:8.0.0
35+
```
36+
37+
5. On [https://quay.io/organization/nf-core](https://quay.io/organization/nf-core), select the new repository, press actions and make public.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
3+
channels:
4+
- conda-forge
5+
- bioconda
6+
dependencies:
7+
- "bioconda::antismash=8.0.0"
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
process ANTISMASH_ANTISMASH {
2+
tag "${meta.id}"
3+
label 'process_medium'
4+
5+
conda "${moduleDir}/environment.yml"
6+
container "nf-core/antismash:8.0.0"
7+
8+
input:
9+
tuple val(meta), path(sequence_input)
10+
path databases
11+
path gff
12+
13+
output:
14+
tuple val(meta), path("${prefix}/clusterblast/*_c*.txt"), optional: true, emit: clusterblast_file
15+
tuple val(meta), path("${prefix}/{css,images,js}"), emit: html_accessory_files
16+
tuple val(meta), path("${prefix}/knownclusterblast/region*/ctg*.html"), optional: true, emit: knownclusterblast_html
17+
tuple val(meta), path("${prefix}/knownclusterblast/"), optional: true, emit: knownclusterblast_dir
18+
tuple val(meta), path("${prefix}/knownclusterblast/*_c*.txt"), optional: true, emit: knownclusterblast_txt
19+
tuple val(meta), path("${prefix}/svg/clusterblast*.svg"), optional: true, emit: svg_files_clusterblast
20+
tuple val(meta), path("${prefix}/svg/knownclusterblast*.svg"), optional: true, emit: svg_files_knownclusterblast
21+
tuple val(meta), path("${prefix}/*.gbk"), emit: gbk_input
22+
tuple val(meta), path("${prefix}/*.json"), emit: json_results
23+
tuple val(meta), path("${prefix}/*.log"), emit: log
24+
tuple val(meta), path("${prefix}/*.zip"), emit: zip
25+
tuple val(meta), path("${prefix}/*region*.gbk"), optional: true, emit: gbk_results
26+
tuple val(meta), path("${prefix}/clusterblastoutput.txt"), optional: true, emit: clusterblastoutput
27+
tuple val(meta), path("${prefix}/index.html"), emit: html
28+
tuple val(meta), path("${prefix}/knownclusterblastoutput.txt"), optional: true, emit: knownclusterblastoutput
29+
tuple val(meta), path("${prefix}/regions.js"), emit: json_sideloading
30+
path "versions.yml", emit: versions
31+
32+
when:
33+
task.ext.when == null || task.ext.when
34+
35+
script:
36+
def args = task.ext.args ?: ''
37+
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
38+
gff_flag = gff ? "--genefinding-gff3 ${gff}" : ""
39+
40+
"""
41+
## We specifically do not include on-the-fly annotations (--genefinding-tool none) as
42+
## this should be run as a separate module for versioning purposes
43+
44+
antismash \\
45+
${args} \\
46+
${gff_flag} \\
47+
-c ${task.cpus} \\
48+
--output-dir ${prefix} \\
49+
--output-basename ${prefix} \\
50+
--genefinding-tool none \\
51+
--logfile ${prefix}/${prefix}.log \\
52+
--databases ${databases} \\
53+
${sequence_input}
54+
55+
cat <<-END_VERSIONS > versions.yml
56+
"${task.process}":
57+
antismash: \$(echo \$(antismash --version) | sed 's/antiSMASH //;s/-.*//g')
58+
END_VERSIONS
59+
"""
60+
61+
stub:
62+
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
63+
"""
64+
mkdir -p ${prefix}/css
65+
mkdir ${prefix}/images
66+
mkdir ${prefix}/js
67+
touch ${prefix}/NZ_CP069563.1.region001.gbk
68+
touch ${prefix}/NZ_CP069563.1.region002.gbk
69+
touch ${prefix}/css/bacteria.css
70+
touch ${prefix}/genome.gbk
71+
touch ${prefix}/genome.json
72+
touch ${prefix}/genome.zip
73+
touch ${prefix}/images/about.svg
74+
touch ${prefix}/index.html
75+
touch ${prefix}/js/antismash.js
76+
touch ${prefix}/js/jquery.js
77+
touch ${prefix}/regions.js
78+
touch ${prefix}/test.log
79+
80+
cat <<-END_VERSIONS > versions.yml
81+
"${task.process}":
82+
antismash: \$(echo \$(antismash --version) | sed 's/antiSMASH //;s/-.*//g')
83+
END_VERSIONS
84+
"""
85+
}
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
name: antismash_antismash
2+
description: |
3+
antiSMASH allows the rapid genome-wide identification, annotation
4+
and analysis of secondary metabolite biosynthesis gene clusters.
5+
keywords:
6+
- secondary metabolites
7+
- BGC
8+
- biosynthetic gene cluster
9+
- genome mining
10+
- NRPS
11+
- RiPP
12+
- antibiotics
13+
- prokaryotes
14+
- bacteria
15+
- eukaryotes
16+
- fungi
17+
- antismash
18+
tools:
19+
- antismash:
20+
description: "antiSMASH - the antibiotics and Secondary Metabolite Analysis SHell"
21+
homepage: "https://docs.antismash.secondarymetabolites.org"
22+
documentation: "https://docs.antismash.secondarymetabolites.org"
23+
tool_dev_url: "https://github.com/antismash/antismash"
24+
doi: "10.1093/nar/gkab335"
25+
licence: ["AGPL v3"]
26+
identifier: biotools:antismash
27+
input:
28+
- - meta:
29+
type: map
30+
description: |
31+
Groovy Map containing sample information
32+
e.g. [ id:'test' ]
33+
- sequence_input:
34+
type: file
35+
description: Nucleotide sequence file (annotated)
36+
pattern: "*.{gbk, gb, gbff, genbank, embl, fasta, fna}"
37+
- - databases:
38+
type: directory
39+
description: |
40+
Downloaded AntiSMASH databases (e.g. in the AntiSMASH installation directory
41+
"data/databases")
42+
pattern: "*/"
43+
- - gff:
44+
type: file
45+
description: Optional GFF3 file containing premade annotations of the input sequence
46+
pattern: "*.gff"
47+
output:
48+
- clusterblast_file:
49+
- meta:
50+
type: map
51+
description: |
52+
Groovy Map containing sample information
53+
e.g. [ id:'test' ]
54+
- ${prefix}/clusterblast/*_c*.txt:
55+
type: file
56+
description: Output of ClusterBlast algorithm
57+
pattern: "clusterblast/*_c*.txt"
58+
- html_accessory_files:
59+
- meta:
60+
type: map
61+
description: |
62+
Groovy Map containing sample information
63+
e.g. [ id:'test' ]
64+
- ${prefix}/{css,images,js}:
65+
type: directory
66+
description: Accessory files for the HTML output
67+
pattern: "{css/,images/,js/}"
68+
- knownclusterblast_html:
69+
- meta:
70+
type: map
71+
description: |
72+
Groovy Map containing sample information
73+
e.g. [ id:'test' ]
74+
- ${prefix}/knownclusterblast/region*/ctg*.html:
75+
type: file
76+
description: Tables with MIBiG hits in HTML format
77+
pattern: "knownclusterblast/region*/ctg*.html"
78+
- knownclusterblast_dir:
79+
- meta:
80+
type: map
81+
description: |
82+
Groovy Map containing sample information
83+
e.g. [ id:'test' ]
84+
- ${prefix}/knownclusterblast/:
85+
type: directory
86+
description: Directory with MIBiG hits
87+
pattern: "knownclusterblast/"
88+
- knownclusterblast_txt:
89+
- meta:
90+
type: map
91+
description: |
92+
Groovy Map containing sample information
93+
e.g. [ id:'test' ]
94+
- ${prefix}/knownclusterblast/*_c*.txt:
95+
type: file
96+
description: Tables with MIBiG hits
97+
pattern: "knownclusterblast/*_c*.txt"
98+
- svg_files_clusterblast:
99+
- meta:
100+
type: map
101+
description: |
102+
Groovy Map containing sample information
103+
e.g. [ id:'test' ]
104+
- ${prefix}/svg/clusterblast*.svg:
105+
type: file
106+
description: SVG images showing the % identity of the aligned hits against their
107+
queries
108+
pattern: "svg/clusterblast*.svg"
109+
- svg_files_knownclusterblast:
110+
- meta:
111+
type: map
112+
description: |
113+
Groovy Map containing sample information
114+
e.g. [ id:'test' ]
115+
- ${prefix}/svg/knownclusterblast*.svg:
116+
type: file
117+
description: SVG images showing the % identity of the aligned hits against their
118+
queries
119+
pattern: "svg/knownclusterblast*.svg"
120+
- gbk_input:
121+
- meta:
122+
type: map
123+
description: |
124+
Groovy Map containing sample information
125+
e.g. [ id:'test' ]
126+
- ${prefix}/*.gbk:
127+
type: file
128+
description: Nucleotide sequence and annotations in GenBank format; converted
129+
from input file
130+
pattern: "*.gbk"
131+
- json_results:
132+
- meta:
133+
type: map
134+
description: |
135+
Groovy Map containing sample information
136+
e.g. [ id:'test' ]
137+
- ${prefix}/*.json:
138+
type: file
139+
description: Nucleotide sequence and annotations in JSON format; converted from
140+
GenBank file (gbk_input)
141+
pattern: "*.json"
142+
- log:
143+
- meta:
144+
type: map
145+
description: |
146+
Groovy Map containing sample information
147+
e.g. [ id:'test' ]
148+
- ${prefix}/*.log:
149+
type: file
150+
description: Contains all the logging output that antiSMASH produced during
151+
its run
152+
pattern: "*.log"
153+
- zip:
154+
- meta:
155+
type: map
156+
description: |
157+
Groovy Map containing sample information
158+
e.g. [ id:'test' ]
159+
- ${prefix}/*.zip:
160+
type: file
161+
description: Contains a compressed version of the output folder in zip format
162+
pattern: "*.zip"
163+
- gbk_results:
164+
- meta:
165+
type: map
166+
description: |
167+
Groovy Map containing sample information
168+
e.g. [ id:'test' ]
169+
- ${prefix}/*region*.gbk:
170+
type: file
171+
description: Nucleotide sequence and annotations in GenBank format; one file
172+
per antiSMASH hit
173+
pattern: "*region*.gbk"
174+
- clusterblastoutput:
175+
- meta:
176+
type: map
177+
description: |
178+
Groovy Map containing sample information
179+
e.g. [ id:'test' ]
180+
- ${prefix}/clusterblastoutput.txt:
181+
type: file
182+
description: Raw BLAST output of known clusters previously predicted by antiSMASH
183+
using the built-in ClusterBlast algorithm
184+
pattern: "clusterblastoutput.txt"
185+
- html:
186+
- meta:
187+
type: map
188+
description: |
189+
Groovy Map containing sample information
190+
e.g. [ id:'test' ]
191+
- ${prefix}/index.html:
192+
type: file
193+
description: Graphical web view of results in HTML format
194+
patterN: "index.html"
195+
- knownclusterblastoutput:
196+
- meta:
197+
type: map
198+
description: |
199+
Groovy Map containing sample information
200+
e.g. [ id:'test' ]
201+
- ${prefix}/knownclusterblastoutput.txt:
202+
type: file
203+
description: Raw BLAST output of known clusters of the MIBiG database
204+
pattern: "knownclusterblastoutput.txt"
205+
- json_sideloading:
206+
- meta:
207+
type: map
208+
description: |
209+
Groovy Map containing sample information
210+
e.g. [ id:'test' ]
211+
- ${prefix}/regions.js:
212+
type: file
213+
description: Sideloaded annotations of protoclusters and/or subregions (see
214+
antiSMASH documentation "Annotation sideloading")
215+
pattern: "regions.js"
216+
- versions:
217+
- versions.yml:
218+
type: file
219+
description: File containing software versions
220+
pattern: "versions.yml"
221+
authors:
222+
- "@jasmezz"
223+
maintainers:
224+
- "@jasmezz"
225+
- "@jfy133"

0 commit comments

Comments
 (0)