Skip to content

Commit 8c339e4

Browse files
authored
Merge pull request #428 from nf-core/add_interproscan_to_amp
Add InterProScan to Pipeline and integrate in AMPcombi
2 parents 9be3c05 + f68d316 commit 8c339e4

File tree

66 files changed

+1361
-345
lines changed

Some content is hidden

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

66 files changed

+1361
-345
lines changed

CHANGELOG.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
- [#421](https://github.com/nf-core/funcscan/pull/421) Updated to nf-core template 3.0.2. (by @jfy133)
1111
- [#427](https://github.com/nf-core/funcscan/pull/427) AMPcombi now can use multiple other databases for classifications. (by @darcy220606)
12+
- [#428](https://github.com/nf-core/funcscan/pull/428) Added InterProScan annotation workflow to the pipeline. The results are coupled to AMPcombi final table. (by @darcy220606)
1213
- [#429](https://github.com/nf-core/funcscan/pull/429) Updated to nf-core template 3.1.0. (by @jfy133 and @jasmezz)
1314
- [#433](https://github.com/nf-core/funcscan/pull/433) Updated to nf-core template 3.1.1. (by @jfy133)
1415
- [#431](https://github.com/nf-core/funcscan/pull/431) Updated AMPcombi, Macrel, all MMseqs2 modules, MultiQC, Pyrodigal, and seqkit, added `--taxa_classification_mmseqs_compressed` parameter. (by @jasmezz)
@@ -28,15 +29,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2829

2930
### `Dependencies`
3031

31-
| Tool | Previous version | New version |
32-
| --------- | ---------------- | ----------- |
33-
| AMPcombi | 0.2.2 | 2.0.1 |
34-
| Bakta | 1.9.3 | 1.10.4 |
35-
| Macrel | 1.2.0 | 1.4.0 |
36-
| MMseqs2 | 15.6f452 | 17.b804f |
37-
| MultiQC | 1.24.0 | 1.27 |
38-
| Pyrodigal | 3.3.0 | 3.6.3 |
39-
| seqkit | 2.8.1 | 2.9.0 |
32+
| Tool | Previous Version | New Version |
33+
| ------------ | ---------------- | ----------- |
34+
| AMPcombi | 0.2.2 | 2.0.1 |
35+
| Bakta | 1.9.3 | 1.10.4 |
36+
| InterProScan | - | 5.59_91.0 |
37+
| Macrel | 1.2.0 | 1.4.0 |
38+
| MMseqs2 | 15.6f452 | 17.b804f |
39+
| MultiQC | 1.24.0 | 1.27 |
40+
| Pyrodigal | 3.3.0 | 3.6.3 |
41+
| seqkit | 2.8.1 | 2.9.0 |
4042

4143
### `Deprecated`
4244

CITATIONS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@
7070

7171
> Eddy S. R. (2011). Accelerated Profile HMM Searches. PLoS computational biology, 7(10), e1002195. [DOI: 10.1371/journal.pcbi.1002195](https://doi.org/10.1371/journal.pcbi.1002195)
7272
73+
- [InterPro](https://doi.org/10.1093/nar/gkaa977)
74+
75+
> Blum, M., Chang, H-Y., Chuguransky, S., Grego, T., Kandasaamy, S., Mitchell, A., Nuka, G., Paysan-Lafosse, T., Qureshi, M., Raj, S., Richardson, L., Salazar, G. A., Williams, L., Bork, P., Bridge, A., Gough, J., Haft, D. H., Letunic, I., Marchler-Bauer, A., Mi, H., Natale, D. A., Necci, M., Orengo, C. A., Pandurangan, A. P., Rivoire, C., Sigrist, C. A., Sillitoe, I., Thanki, N., Thomas, P. D., Tosatto, S. C. E, Wu, C. H., Bateman, A., Finn, R. D. (2021) The InterPro protein families and domains database: 20 years on. Nucleic Acids Research, 49(D1), D344–D354. [DOI: 10.1093/nar/gkaa977](https://doi.org/10.1093/nar/gkaa977)
76+
77+
- [InterProScan](https://doi.org/10.1093/bioinformatics/btu031)
78+
79+
> Jones, P., Binns, D., Chang, H-Y., Fraser, M., Li, W., McAnulla, C., McWilliam, H., Maslen, J., Mitchell, A., Nuka, G., Pesseat, S., Quinn, A. F., Sangrador-Vegas, A., Scheremetjew, M., Yong, S-Y., Lopez, R., Hunter, S. (2014) InterProScan 5: genome-scale protein function classification. Bioinformatics, 30(9), 1236–1240. [DOI: 10.1093/bioinformatics/btu031](https://doi.org/10.1093/bioinformatics/btu031)
80+
7381
- [Macrel](https://doi.org/10.7717/peerj.10555)
7482

7583
> Santos-Júnior, C. D., Pan, S., Zhao, X. M., & Coelho, L. P. (2020). Macrel: antimicrobial peptide screening in genomes and metagenomes. PeerJ, 8, e10555. [DOI: 10.7717/peerj.10555](https://doi.org/10.7717/peerj.10555)

conf/base.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,11 @@ process {
231231
memory = { 6.GB * task.attempt }
232232
time = { 2.h * task.attempt }
233233
}
234+
235+
withName: INTERPROSCAN_DATABASE {
236+
memory = { 6.GB * task.attempt }
237+
time = { 4.h * task.attempt }
238+
cpus = { 6 * task.attempt }
239+
}
240+
234241
}

conf/modules.config

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ process {
9191
].join(' ').trim()
9292
}
9393

94-
withName: SEQKIT_SEQ {
94+
withName: SEQKIT_SEQ_LENGTH {
9595
ext.prefix = { "${meta.id}_long" }
9696
publishDir = [
9797
path: { "${params.outdir}/bgc/seqkit/" },
@@ -104,6 +104,45 @@ process {
104104
].join(' ').trim()
105105
}
106106

107+
withName: SEQKIT_SEQ_FILTER {
108+
ext.prefix = { "${meta.id}_cleaned.faa" }
109+
publishDir = [
110+
path: { "${params.outdir}/protein_annotation/interproscan/" },
111+
mode: params.publish_dir_mode,
112+
enabled: { params.run_protein_annotation },
113+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
114+
]
115+
ext.args = [
116+
"--gap-letters '* \t.' --remove-gaps"
117+
].join(' ').trim()
118+
}
119+
120+
withName: INTERPROSCAN_DATABASE {
121+
publishDir = [
122+
path: { "${params.outdir}/databases/interproscan/" },
123+
mode: params.publish_dir_mode,
124+
enabled: params.save_db,
125+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
126+
]
127+
}
128+
129+
withName: INTERPROSCAN {
130+
ext.prefix = { "${meta.id}_interproscan.faa" }
131+
publishDir = [
132+
path: { "${params.outdir}/protein_annotation/interproscan/" },
133+
mode: params.publish_dir_mode,
134+
enabled: params.run_protein_annotation,
135+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
136+
]
137+
ext.args = [
138+
"--applications ${params.protein_annotation_interproscan_applications}",
139+
params.protein_annotation_interproscan_enableprecalc ? '' : '--disable-precalc',
140+
'--disable-residue-annot',
141+
'--enable-tsv-residue-annot',
142+
"--formats tsv"
143+
].join(' ').trim() // Warning: Do not disable the flags "--enable-tsv-residue-annot" and "--formats tsv"! This would cause a run failure because the format of the resulting files would no longer be adequate for parsing by AMPcombi2.
144+
}
145+
107146
withName: PROKKA {
108147
ext.prefix = { "${meta.id}_prokka" }
109148
publishDir = [
@@ -687,7 +726,7 @@ process {
687726

688727
withName: AMP_DATABASE_DOWNLOAD {
689728
publishDir = [
690-
path: { "${params.outdir}/databases/${params.amp_ampcombi_db}" },
729+
path: { "${params.outdir}/databases/ampcombi/" },
691730
mode: params.publish_dir_mode,
692731
enabled: params.save_db,
693732
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },

docs/output.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ results/
2525
| ├── prodigal/
2626
| ├── prokka/
2727
| └── pyrodigal/
28+
├── protein_annotation/
29+
| └── interproscan/
2830
├── amp/
2931
| ├── ampir/
3032
| ├── amplify/
@@ -74,6 +76,10 @@ ORF prediction and annotation with any of:
7476
- [Prokka](#prokka) – open reading frame prediction and functional protein annotation.
7577
- [Bakta](#bakta) – open reading frame prediction and functional protein annotation.
7678

79+
CDS domain annotation:
80+
81+
- [InterProScan](#interproscan) (default) – for open reading frame protein and domain predictions.
82+
7783
Antimicrobial Resistance Genes (ARGs):
7884

7985
- [ABRicate](#abricate) – antimicrobial resistance gene detection, based on alignment to one of several databases.
@@ -216,6 +222,23 @@ Output Summaries:
216222

217223
[Bakta](https://github.com/oschwengers/bakta) is a tool for the rapid & standardised annotation of bacterial genomes and plasmids from both isolates and MAGs. It provides dbxref-rich, sORF-including and taxon-independent annotations in machine-readable JSON & bioinformatics standard file formats for automated downstream analysis. The output is used by some of the functional screening tools.
218224

225+
### Protein annotation
226+
227+
[InterProScan](#interproscan)
228+
229+
#### InterProScan
230+
231+
<details markdown="1">
232+
<summary>Output files</summary>
233+
234+
- `interproscan/`
235+
- `<samplename>_cleaned.faa`: clean version of the fasta files (in amino acid format) generated by one of the annotation tools (i.e. Pyrodigal, Prokka, Bakta). These contain sequences with no special characters (for eg. `*` or `-`).
236+
- `<samplename>_interproscan_faa.tsv`: predicted proteins and domains using the InterPro database in TSV format
237+
238+
</details>
239+
240+
[InterProScan](https://github.com/ebi-pf-team/interproscan) is designed to predict protein functions and provide possible domain and motif information of the coding regions. It utilizes the InterPro database that consists of multiple sister databases such as PANTHER, ProSite, Pfam, etc. More details can be found in the [documentation](https://interproscan-docs.readthedocs.io/en/latest/index.html).
241+
219242
### AMP detection tools
220243

221244
[ampir](#ampir), [AMPlify](#amplify), [hmmsearch](#hmmsearch), [Macrel](#macrel)
@@ -465,6 +488,11 @@ Note that filtered FASTA is only used for BGC workflow for run-time optimisation
465488
- `<sample>/*_ampcombi.tsv`: summarised output in tsv format for each sample
466489
- `<sample>/*_amp.faa*`: fasta file containing the amino acid sequences for all AMP hits for each sample
467490
- `<sample>/*_mmseqs_matches.txt*`: alignment file generated by MMseqs2 for each sample
491+
492+
:::info
493+
In some cases when the AMP and the taxonomic classification subworkflows are turned on, it can happen that only summary files per sample are created in the output folder with **no** `Ampcombi_summary.tsv` and `Ampcombi_summary_cluster.tsv` files with no taxonomic classifications merged. This can occur if some AMP prediction parameters are 'too strict' or only one AMP tool is run, which can lead to no AMP hits found in any of the samples or in only one sample. Look out for the warning `[nf-core/funcscan] AMPCOMBI2: 0/1 file passed. Skipping AMPCOMBI2_COMPLETE, AMPCOMBI2_CLUSTER, and TAXONOMY MERGING steps.` in the stdout or `.nextflow.log` file. In that case we recommend to lower the AMP prediction thresholds and run more than one AMP prediction tool.
494+
:::
495+
468496
<summary>AMP summary table header descriptions using DRAMP as reference database</summary>
469497

470498
| Table column | Description |

docs/usage.md

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ We highly recommend performing quality control on input contigs before running t
109109
For example, ideally BGC screening requires contigs of at least 3,000 bp else downstream tools may crash.
110110
:::
111111

112-
## Notes on screening tools and taxonomic classification
112+
## Notes on screening tools, taxonomic and functional classifications
113113

114114
The implementation of some tools in the pipeline may have some particular behaviours that you should be aware of before you run the pipeline.
115115

@@ -131,6 +131,18 @@ MMseqs2 is currently the only taxonomic classification tool used in the pipeline
131131
--taxa_classification_mmseqs_db_id 'Kalamari'
132132
```
133133

134+
### InterProScan
135+
136+
[InterProScan](https://github.com/ebi-pf-team/interproscan) is currently the only protein annotation tool that gives a snapshot of the protein families and domains for each coding region.
137+
138+
The protein annotation workflow is activated with the flag `--run_protein_annotation`. InterProScan is used as the only protein annotation tool at the moment and the [InterPro database](http://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.72-103.0) version 5.72-103.0 is downloaded and prepared to screen the input sequences against it.
139+
140+
Since the database download is huge (5.5GB) and might take quite some time, you can skip the automatic database download on each run by manually downloading and extracting the files of any [InterPro version](http://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/) beforehand and providing the resulting directory path to `--protein_annotation_interproscan_db <path/to/interprodatabase>`.
141+
142+
:::info
143+
By default, the databases used by InterProScan is set as `PANTHER,ProSiteProfiles,ProSitePatterns,Pfam`. An addition of other application to the list does not guarantee that the results will be integrated correctly within `AMPcombi`.
144+
:::
145+
134146
### antiSMASH
135147

136148
antiSMASH has a minimum contig parameter, in which only contigs of a certain length (or longer) will be screened. In cases where no hits are found in these, the tool ends successfully without hits. However if no contigs in an input file reach that minimum threshold, the tool will end with a 'failure' code, and cause the pipeline to crash.
@@ -256,7 +268,13 @@ The pipeline will automatically run Pyrodigal instead of Prodigal if the paramet
256268
This is due to an incompatibility issue of Prodigal's output `.gbk` file with multiple downstream tools.
257269
:::
258270

259-
### Abricate
271+
:::tip
272+
273+
- If `--run_protein_annotation` is activated, protein and domain classifications of the coding regions are generated and then used by the `ampcombi2/parsetables` module to create a table for every sample and the complete summary files e.g., `Ampcombi_summary.tsv`.
274+
275+
In some cases when the AMP and the taxonomic classification subworkflows are turned on, it can happen that only summary files per sample are created in the output folder with **no** `Ampcombi_summary.tsv` and `Ampcombi_summary_cluster.tsv` files with no taxonomic classifications merged. This can occur if some AMP prediction parameters are 'too strict' or only one AMP tool is run, which can lead to no AMP hits found in any of the samples or in only one sample. Look out for the warning `[nf-core/funcscan] AMPCOMBI2: 0/1 file passed. Skipping AMPCOMBI2_COMPLETE, AMPCOMBI2_CLUSTER, and TAXONOMY MERGING steps.` in the stdout or `.nextflow.log` file. In that case we recommend to lower the AMP prediction thresholds and run more than one AMP prediction tool.
276+
277+
### ABRicate
260278

261279
The default ABRicate installation comes with a series of 'default' databases:
262280

@@ -499,14 +517,52 @@ The contents of the database directory should include directories such as `commo
499517
```console
500518
deepbgc_db/
501519
├── common
502-
└── Pfam-hmm-models*.hmm.*
503520
└── <version-num>[0.1.0]
504521
├── classifier
505522
| └── myClassifiers*.pkl
506523
└── detector
507524
└── myDetectors*.pkl
508525
```
509526

527+
### InterProScan
528+
529+
[InterProScan](https://github.com/ebi-pf-team/interproscan) is used to provide more information about the proteins annotated on the contigs. By default, turning on this subworkflow with `--run_protein_annotation` will download and unzip the [InterPro database](http://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.72-103.0/) version 5.72-103.0. The database can be saved in the output directory `<output_directors>/databases/interproscan/` if the `--save_db` is turned on. Note: the huge database download (5.5GB) can take up to 4 hours depending on the bandwidth.
530+
531+
A local version of the database can be supplied to the pipeline by passing the InterProScan database directory to `--protein_annotation_interproscan_db <path/to/downloaded-untarred-interproscan_db-dir/>`. The directory can be created by running (e.g. for database version 5.67-99.0):
532+
533+
```
534+
curl -L https://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.72-103.0/interproscan-5.72-103.0-64-bit.tar.gz -o interproscan_db/interproscan-5.72-103.0-64-bit.tar.gz
535+
tar -xzf interproscan_db/interproscan-5.72-103.0-64-bit.tar.gz -C interproscan_db/
536+
537+
```
538+
539+
The contents of the database directory should include the directory `data` in the top level with a couple of subdirectories:
540+
541+
```
542+
interproscan_db/
543+
└── data/
544+
├── antifam
545+
├── cdd
546+
├── funfam
547+
├── gene3d
548+
├── hamap
549+
├── ncbifam
550+
├── panther
551+
| └── [18.0]
552+
├── pfam
553+
| └── [36.0]
554+
├── phobius
555+
├── pirsf
556+
├── pirsr
557+
├── prints
558+
├── prosite
559+
| └── [2023_05]
560+
├── sfld
561+
├── smart
562+
├── superfamily
563+
└── tmhmm
564+
```
565+
510566
## Updating the pipeline
511567

512568
When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:

0 commit comments

Comments
 (0)