Skip to content

Commit

Permalink
[FIX] working with 0-* domains files
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Jan 16, 2025
1 parent f1d2805 commit 797e0a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions modules/local/domains/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ 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
"""

stub:
"""
touch domains.h5
"""
}
}
7 changes: 3 additions & 4 deletions subworkflows/local/domains/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 797e0a1

Please sign in to comment.