defensefinder
Tags: anti-phage defense-systems hmm protein-domains bactopia-tool
Systematic identification of anti-phage defense systems.
This Bactopia Tool uses DefenseFinder to systematically search for and identify all known anti-phage defense systems in bacterial genomes using HMM-based protein domain detection.
Usage
Bactopia CLI:
bactopia --wf defensefinder \
--bactopia /path/to/your/bactopia/results
Nextflow:
nextflow run bactopia/bactopia/workflows/bactopia-tools/defensefinder/main.nf \
--bactopia /path/to/your/bactopia/results
Outputs
Expected Output Files
<BACTOPIA_DIR>
├── <SAMPLE_NAME>
│ └── tools
│ └── defensefinder-<TIMESTAMP>
│ ├── <SAMPLE_NAME>_defense_finder_genes.tsv
│ ├── <SAMPLE_NAME>_defense_finder_hmmer.tsv
│ ├── <SAMPLE_NAME>_defense_finder_systems.tsv
│ └── logs
│ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ └── versions.yml
└── bactopia-runs
└── defensefinder-<TIMESTAMP>
├── merged-results
│ ├── defensefinder-genes.tsv
│ ├── defensefinder-hmmer.tsv
│ ├── defensefinder-systems.tsv
│ └── logs
│ ├── defensefinder-genes-concat
│ │ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ │ └── versions.yml
│ ├── defensefinder-hmmer-concat
│ │ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ │ └── versions.yml
│ └── defensefinder-systems-concat
│ ├── nf.command.{begin,err,log,out,run,sh,trace}
│ └── versions.yml
└── nf-reports
├── defensefinder-dag.dot
├── defensefinder-report.html
└── defensefinder-timeline.html
Per-Sample Results
| File | Description |
|---|---|
*.prt | FASTA file containing all proteins found in defense systems |
*.prt.idx | Index file for the proteins file |
*defense_finder_genes.tsv | TSV file with each gene found in defense systems |
*defense_finder_hmmer.tsv | TSV file with each HMM hit |
*defense_finder_systems.tsv | TSV file with information about each system found |
*.macsydata.tar.gz | Raw MACSyFinder output file (requires --defensefinder_preserveraw) |
Merged Results
| File | Description |
|---|---|
defensefinder-genes.tsv | Merged TSV of all genes found in defense systems |
defensefinder-hmmer.tsv | Merged TSV of all HMM hits |
defensefinder-systems.tsv | Merged TSV of all information about systems found |
Audit Trail
Below are files that can assist you in understanding which parameters and program versions were used.
Logs
Each process that is executed will have a folder named logs. In this folder are helpful
files for you to review if the need ever arises.
| Extension | Description |
|---|---|
| .begin | An empty file used to designate the process started |
| .err | Contains STDERR outputs from the process |
| .log | Contains both STDERR and STDOUT outputs from the process |
| .out | Contains STDOUT outputs from the process |
| .run | The script Nextflow uses to stage/unstage files and queue processes based on given profile |
| .sh | The script executed by bash for the process |
| .trace | The Nextflow trace report for the process |
| versions.yml | A YAML formatted file with program versions |
Nextflow Reports
These Nextflow reports provide great a great summary of your run. These can be used to optimize resource usage and estimate expected costs if using cloud platforms.
| Filename | Description |
|---|---|
| defensefinder-dag.dot | The Nextflow DAG visualization |
| defensefinder-report.html | The Nextflow Execution Report |
| defensefinder-timeline.html | The Nextflow Timeline Report |
| defensefinder-trace.txt | The Nextflow Trace report |
Parameters
Required Parameters
Define where the pipeline should find input data and save output data.
| Parameter | Type | Default | Description |
|---|---|---|---|
--bactopia | string | The path to bactopia results to use as inputs |
defense-finder Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--defensefinder_coverage | number | 0.4 | Minimal percentage of coverage for each profiles |
--defensefinder_dbtype | string | ordered_replicon | The macsyfinder --db-type option (choices: ordered_replicon, gembase, unordered) |
Filtering Parameters
Use these parameters to specify which samples to include or exclude.
| Parameter | Type | Default | Description |
|---|---|---|---|
--include | string | A text file containing sample names (one per line) to include from the analysis | |
--exclude | string | A text file containing sample names (one per line) to exclude from the analysis |
Optional Parameters
These optional parameters can be useful in certain settings.
| Parameter | Type | Default | Description |
|---|---|---|---|
--outdir | string | bactopia | Base directory to write results to |
Nextflow Profile Parameters
Parameters to fine-tune your Nextflow setup.
| Parameter | Type | Default | Description |
|---|---|---|---|
--datasets_cache | string | <HOME>/.bactopia/datasets | Directory where downloaded datasets should be stored. |
Helpful Parameters
Uncommonly used parameters that might be useful.
| Parameter | Type | Default | Description |
|---|---|---|---|
--wf | string | bactopia | Specify which workflow or Bactopia Tool to execute |
--list_wfs | boolean | List the available workflows and Bactopia Tools to use with '--wf' | |
--help_all | boolean | An alias for --help --show_hidden_params | |
--version | boolean | Display version text. |
Composition
This workflow uses the following subworkflows:
- defensefinder - Systematically search for anti-phage defense systems.
Citations
If you use this in your analysis, please cite the following.
-
Bactopia
Petit III RA, Read TD Bactopia - a flexible pipeline for complete analysis of bacterial genomes. mSystems 5 (2020) -
DefenseFinder
Tesson F, Hervé A, Mordret E, Touchon M, d'Humières C, Cury J, Bernheim A Systematic and quantitative view of the antiviral arsenal of prokaryotes. Nature Communications, 13(1), 2561. (2022)