From 797e0a1f7785cf8b943d0e4df6a8d8c460813ca2 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Thu, 16 Jan 2025 13:32:58 +0100 Subject: [PATCH] [FIX] working with 0-* domains files --- modules/local/domains/main.nf | 7 +++---- subworkflows/local/domains/main.nf | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/local/domains/main.nf b/modules/local/domains/main.nf index f960f09..6af399a 100644 --- a/modules/local/domains/main.nf +++ b/modules/local/domains/main.nf @@ -14,13 +14,12 @@ process ADD_DOMAINS { path "domains.h5", emit: domains_h5 script: - def domains = ($domain_files.name != "NO_FILE") ? "--domains $domain_files" : '' """ oma-build -vv domains \\ --db $database \\ --hdf5-out domains.h5 \\ - $domains \\ - --cath-names $cath_names \ + --domains $domain_files \\ + --cath-names $cath_names \\ --pfam-names $pfam_names """ @@ -28,4 +27,4 @@ process ADD_DOMAINS { """ touch domains.h5 """ -} \ No newline at end of file +} diff --git a/subworkflows/local/domains/main.nf b/subworkflows/local/domains/main.nf index a66f447..bbde205 100644 --- a/subworkflows/local/domains/main.nf +++ b/subworkflows/local/domains/main.nf @@ -10,18 +10,17 @@ workflow DOMAINS { main: // TODO should be extended to include computation of new domain annotation // for unknown sequences - known_domains = (params.known_domains != null) ? Channel.fromPath("${params.known_domains}/*").collect() : Channel.fromPath("$projectDir/assets/NO_FILE") + known_domains = (params.known_domains != null) ? Channel.fromPath("${params.known_domains}/*").collect() : [] cath_names = (params.cath_names_path != null) ? Channel.fromPath(params.cath_names_path) : Channel.fromPath("$projectDir/assets/NO_FILE") pfam_names = (params.pfam_names_path != null) ? Channel.fromPath(params.pfam_names_path) : Channel.fromPath("$projectDir/assets/NO_FILE") ADD_DOMAINS(database, known_domains, cath_names, pfam_names) - domains_h5 = ADD_DOMAINS.out.domains_h5 emit: - domains_h5 + domains_h5 = ADD_DOMAINS.out.domains_h5 } workflow { database = Channel.fromPath(params.database) DOMAINS(database) -} \ No newline at end of file +}