Skip to content

Commit

Permalink
add option to provide custom amrfinder or mlst databases
Browse files Browse the repository at this point in the history
  • Loading branch information
rpetit3 committed May 1, 2024
1 parent 27290bd commit 16545ce
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ description: A full list of Bactopia releases and a description of the changes.
- now required non-integer values for `--max_time` (e.g. `4.h`) and `--max_memory` (e.g. `8.GB`)
- always import `base.config`
- `amrfinderplus` by combining results from genes, proteins and gff (coordinates)
- `--amrfinder_db` and `--mlst_db` to specify custom databases

### `Fixed`

Expand Down
1 change: 1 addition & 0 deletions modules/nf-core/amrfinderplus/run/params.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ params {
report_common = false
report_all_equal = false
amrfinder_opts = ""
amrfinder_db = ""
}
6 changes: 6 additions & 0 deletions modules/nf-core/amrfinderplus/run/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
"type": "string",
"description": "Extra AMRFinder+ options in quotes.",
"fa_icon": "fas fa-expand-arrows-alt"
},
"amrfinder_db": {
"type": "string",
"default": "",
"description": "A custom AMRFinder+ database to use. Contents should be within a directory called 'amrfinderplus'",
"fa_icon": "fas fa-expand-arrows-alt"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/mlst/params.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"minscore": {
"type": "integer",
"default": 50,
"description": "Minumum score out of 100 to match a scheme",
"description": "Minimum score out of 100 to match a scheme",
"fa_icon": "fas fa-expand-arrows-alt"
},
"nopath": {
Expand Down
6 changes: 5 additions & 1 deletion subworkflows/local/amrfinderplus/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ workflow AMRFINDERPLUS {
ch_merged_reports = Channel.empty()

// Run AMRFinder
AMRFINDERPLUS_RUN ( fasta, db )
if (params.amrfinder_db) {
AMRFINDERPLUS_RUN(fasta, file(params.amrfinder_db))
} else {
AMRFINDERPLUS_RUN(fasta, db)
}
ch_versions = ch_versions.mix(AMRFINDERPLUS_RUN.out.versions.first())

// Merge results
Expand Down
7 changes: 6 additions & 1 deletion subworkflows/local/mlst/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ workflow MLST {
main:
ch_versions = Channel.empty()

MLST_MODULE(fasta, db)
if (params.mlst_db) {
MLST_MODULE(fasta, file(params.mlst_db))
} else {
MLST_MODULE(fasta, db)
}

ch_versions = ch_versions.mix(MLST_MODULE.out.versions.first())

// Merge results
Expand Down

0 comments on commit 16545ce

Please sign in to comment.