diff --git a/modules/local/xref_fetch/main.nf b/modules/local/xref_fetch/main.nf index 952f06e..d01482c 100644 --- a/modules/local/xref_fetch/main.nf +++ b/modules/local/xref_fetch/main.nf @@ -135,3 +135,25 @@ process COMBINE_ALL_XREFS { --xrefs $xref_dbs \\ """ } + +process BUILD_REDUCED_XREFS { + label "process_low" + container "dessimozlab/omabuild:nf-latest" + tag "Building a reduced set of xrefs for lookup and search" + + input: + path db + path xref_db + + output: + path("reduced-xrefs-db.h5"), emit: red_xref_db_h5 + + script: + """ + oma-build -vv reduced-xrefs \\ + --out reduced-xrefs-db.h5 \\ + --xrefs $xref_dbs \\ + --db $db \\ + --nr-procs ${task.cpus} + """ +} diff --git a/subworkflows/local/xrefs/main.nf b/subworkflows/local/xrefs/main.nf index e83e089..7240296 100644 --- a/subworkflows/local/xrefs/main.nf +++ b/subworkflows/local/xrefs/main.nf @@ -22,9 +22,11 @@ workflow GENERATE_XREFS { db_h5, seqidx_h5, source_xref_h5) + BUILD_REDUCED_XREFS(db_h5, MAP_XREFS_WF.out.xref_db) emit: taxmap = PREPARE_XREFS.out.taxmap xref_db = MAP_XREFS_WF.out.xref_db + red_xref_db = BUILD_REDUCED_XREFS.out.red_xref_db_h5 } diff --git a/workflows/oma_browser_build.nf b/workflows/oma_browser_build.nf index c6f17b0..d6f1983 100644 --- a/workflows/oma_browser_build.nf +++ b/workflows/oma_browser_build.nf @@ -35,7 +35,7 @@ workflow OMA_BROWSER_BUILD { DOMAINS(IMPORT_HDF5.out.db_h5, domains, cath_names, pfam_names) domains_h5 = DOMAINS.out.domains_h5 } else { - domains_h5 = null + domains_h5 = Channel.empty() } CACHE_BUILDER(IMPORT_HDF5.out.db_h5) GEN_BROWSER_AUX_FILES(IMPORT_HDF5.out.db_h5) @@ -60,7 +60,8 @@ workflow OMA_BROWSER_BUILD { domains_h5, GENERATE_XREFS.out.xref_db, GO_IMPORT.out.go_h5, - CACHE_BUILDER.out.cache_h5) + CACHE_BUILDER.out.cache_h5, + GENERATE_XREFS.out.red_xref_db) h5_dbs_to_combine.view() COMBINE_HDF(h5_dbs_to_combine.collect())