diff --git a/CHANGELOG.md b/CHANGELOG.md index 31466033..6ffe23d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#363](https://github.com/nf-core/funcscan/pull/363) Removed warning from DeepBGC usage docs. (by @jasmezz) - [#365](https://github.com/nf-core/funcscan/pull/365) Fixed AMRFinderPlus module and usage docs for manual database download. (by @jasmezz) - [#371](https://github.com/nf-core/funcscan/pull/371) Fixed AMRFinderPlus parameter `arg_amrfinderplus_name`. (by @m3hdad) -- [#376](https://github.com/nf-core/funcscan/pull/376) Fixed an occasional RGI process failure when certain files not produced. (by @jfy133) +- [#376](https://github.com/nf-core/funcscan/pull/376) Fixed an occasional RGI process failure when certain files not produced. (❤️ to @amizeranschi for reporting, fix by @amizeranschi & @jfy133) ### `Dependencies` diff --git a/modules.json b/modules.json index e47d1885..d1171ecd 100644 --- a/modules.json +++ b/modules.json @@ -177,7 +177,7 @@ }, "rgi/main": { "branch": "master", - "git_sha": "4dc25cf0a0f11ea5a2693ec2540d41cbb829fabe", + "git_sha": "0ae1adbee6a09b4c5097e990b2db1f5ebe96265c", "installed_by": ["modules"] }, "seqkit/seq": { diff --git a/modules/nf-core/rgi/main/main.nf b/modules/nf-core/rgi/main/main.nf index 6ac87f13..ba05358a 100644 --- a/modules/nf-core/rgi/main/main.nf +++ b/modules/nf-core/rgi/main/main.nf @@ -60,16 +60,7 @@ process RGI_MAIN { --input_sequence $fasta mkdir temp/ - mv *.xml *.fsa *.{nhr,nin,nsq} *.draft *.potentialGenes temp/ - - ## These files not always generated, so only move if they exist - ## Taken from https://stackoverflow.com/a/54655320 (RIP) by @TSJNachos117 - if [ "\$(ls -A | grep -i \\variant.json\\\$)" ] ; then mv *variant.json temp/ ; fi - if [ "\$(ls -A | grep -i \\rrna.json\\\$)" ] ; then mv *rrna.json temp/ ; fi - if [ "\$(ls -A | grep -i \\protein.json\\\$)" ] ; then mv *protein.json temp/ ; fi - if [ "\$(ls -A | grep -i \\predictedGenes.json\\\$)" ]; then mv *predictedGenes.json temp/; fi - if [ "\$(ls -A | grep -i \\overexpression.json\\\$)" ]; then mv *overexpression.json temp/; fi - if [ "\$(ls -A | grep -i \\homolog.json\\\$)" ] ; then mv *homolog.json temp/ ; fi + for FILE in *.xml *.fsa *.{nhr,nin,nsq} *.draft *.potentialGenes *{variant,rrna,protein,predictedGenes,overexpression,homolog}.json; do [[ -e \$FILE ]] && mv \$FILE temp/; done RGI_VERSION=\$(rgi main --version)