Skip to content

Commit

Permalink
[ADD] COMBINE all xrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Oct 28, 2024
1 parent 2b40c50 commit 4f33ea6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
20 changes: 20 additions & 0 deletions modules/local/xref_fetch/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,24 @@ process COLLECT_XREFS {
--source $source \\
--out ./xref-${source}.h5
"""
}


process COMBINE_ALL_XREFS {
label "process_single"
container "dessimozlab/omabuild:nf-latest"
tag "Collecting xrefs for $source"

input:
path xref_dbs

output:
tuple "XRef-db.h5", emit: xref_db_h5

script:
"""
oma-build -vv combine-xrefs \\
--out "XRef-db.h5"
--xrefs $xref_dbs \\
"""
}
9 changes: 7 additions & 2 deletions subworkflows/local/xrefs/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env nextflow

include { FETCH_REFSEQ; FILTER_AND_SPLIT; MAP_XREFS; COLLECT_XREFS } from "./../../../modules/local/xref_fetch"
include { FETCH_REFSEQ; FILTER_AND_SPLIT; MAP_XREFS; COLLECT_XREFS; COMBINE_ALL_XREFS } from "./../../../modules/local/xref_fetch"

workflow PREPARE_XREFS {
take:
Expand Down Expand Up @@ -65,7 +65,12 @@ workflow MAP_XREFS_WF {
.groupTuple()
.map { source, map_resList, format, xrefList -> [source, map_resList, format, xrefList.flatten()]
COLLECT_XREFS(grouped_by_source)
xref_dbs_list = COLLECT_XREFS.out.xref_by_source_h5
.map{ source, db -> db}
.mix(source_xref_db)
.collect()
COMBINE_ALL_XREFS(xref_dbs_list)
emit:
xref_db = COLLECT_XREFS.out.xref_by_source_h5
xref_db = COMBINE_ALL_XREFS.out.xref_db_h5
}

0 comments on commit 4f33ea6

Please sign in to comment.