Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix macrel faa input #242

Merged
merged 10 commits into from
Apr 14, 2023
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#237](https://github.com/nf-core/funcscan/pull/237) Reactivate DeepARG automatic database downloading and CI tests as server is now back up. (by @jfy133)
- [#235](https://github.com/nf-core/funcscan/pull/235) Improved annotation speed by switching off pipeline-irrelevant Bakta annotation steps by default. (by @jasmezz)
- [#235](https://github.com/nf-core/funcscan/pull/235) Renamed parameter `annotation_bakta_db` to `annotation_bakta_db_localpath`. (by @jasmezz)
- [#242](https://github.com/nf-core/funcscan/pull/242) Fixed MACREL '.faa' issue that was generated when it was run on its own. (by @Darcy220606)
- [#248](https://github.com/nf-core/funcscan/pull/248) Applied best-practice `error("message")` to all (sub)workflow files. (by @jasmezz)

### `Dependencies`
Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
},
"macrel/contigs": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "a5a5bb12e7cc25658fdc97d810f2d6688cdae169",
"installed_by": ["modules"]
},
"multiqc": {
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/macrel/contigs/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions subworkflows/local/amp.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ include { AMPLIFY_PREDICT } from '../.
include { AMPIR } from '../../modules/nf-core/ampir/main'
include { DRAMP_DOWNLOAD } from '../../modules/local/dramp_download'
include { AMPCOMBI } from '../../modules/nf-core/ampcombi/main'
include { GUNZIP as GUNZIP_MACREL ; GUNZIP as GUNZIP_HMMER } from '../../modules/nf-core/gunzip/main'
include { GUNZIP as GUNZIP_MACREL_PRED ; GUNZIP as GUNZIP_HMMER ; GUNZIP as GUNZIP_MACREL_ORFS } from '../../modules/nf-core/gunzip/main'
include { TABIX_BGZIP } from '../../modules/nf-core/tabix/bgzip/main'


workflow AMP {
take:
contigs // tuple val(meta), path(contigs)
Expand All @@ -21,6 +20,7 @@ workflow AMP {
ch_versions = Channel.empty()
ch_ampresults_for_ampcombi = Channel.empty()
ch_ampcombi_summaries = Channel.empty()
ch_macrel_faa = Channel.empty()

// When adding new tool that requires FAA, make sure to update conditions
// in funcscan.nf around annotation and AMP subworkflow execution
Expand All @@ -33,24 +33,28 @@ workflow AMP {
// AMPLIFY
if ( !params.amp_skip_amplify ) {
AMPLIFY_PREDICT ( ch_faa_for_amplify, [] )
ch_versions = ch_versions.mix(AMPLIFY_PREDICT.out.versions)
ch_ampresults_for_ampcombi = ch_ampresults_for_ampcombi.mix(AMPLIFY_PREDICT.out.tsv)
ch_versions = ch_versions.mix(AMPLIFY_PREDICT.out.versions)
ch_ampresults_for_ampcombi = ch_ampresults_for_ampcombi.mix(AMPLIFY_PREDICT.out.tsv)
}

// MACREL
if ( !params.amp_skip_macrel ) {
MACREL_CONTIGS ( contigs )
ch_versions = ch_versions.mix(MACREL_CONTIGS.out.versions)
GUNZIP_MACREL ( MACREL_CONTIGS.out.amp_prediction )
ch_versions = ch_versions.mix(GUNZIP_MACREL.out.versions)
ch_ampresults_for_ampcombi = ch_ampresults_for_ampcombi.mix(GUNZIP_MACREL.out.gunzip)
ch_versions = ch_versions.mix(MACREL_CONTIGS.out.versions)
GUNZIP_MACREL_PRED ( MACREL_CONTIGS.out.amp_prediction )
GUNZIP_MACREL_ORFS ( MACREL_CONTIGS.out.all_orfs )
ch_versions = ch_versions.mix(GUNZIP_MACREL_PRED.out.versions)
ch_versions = ch_versions.mix(GUNZIP_MACREL_ORFS.out.versions)
ch_ampresults_for_ampcombi = ch_ampresults_for_ampcombi.mix(GUNZIP_MACREL_PRED.out.gunzip)
ch_macrel_faa = ch_macrel_faa.mix(GUNZIP_MACREL_ORFS.out.gunzip)
ch_faa_for_ampcombi = ch_faa_for_ampcombi.mix(ch_macrel_faa)
}

Darcy220606 marked this conversation as resolved.
Show resolved Hide resolved
// AMPIR
if ( !params.amp_skip_ampir ) {
AMPIR ( ch_faa_for_ampir, params.amp_ampir_model, params.amp_ampir_minlength, 0.0 )
ch_versions = ch_versions.mix(AMPIR.out.versions)
ch_ampresults_for_ampcombi = ch_ampresults_for_ampcombi.mix(AMPIR.out.amps_tsv)
ch_versions = ch_versions.mix(AMPIR.out.versions)
ch_ampresults_for_ampcombi = ch_ampresults_for_ampcombi.mix(AMPIR.out.amps_tsv)
}

// HMMSEARCH
Expand Down