-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from EBI-Metagenomics/add_goslims_swf
Add goslims subworkflow
- Loading branch information
Showing
8 changed files
with
224 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
include { GENERATEGAF } from '../../../modules/ebi-metagenomics/generategaf/main' | ||
include { OWLTOOLS } from '../../../modules/ebi-metagenomics/owltools/main' | ||
include { SUMMARISEGOSLIMS } from '../../../modules/ebi-metagenomics/summarisegoslims/main' | ||
|
||
workflow GOSLIM_SWF { | ||
|
||
take: | ||
ch_ips // channel: [ val(meta), path(tsv) ] | ||
go_obo // channel: path(obo) | ||
goslim_ids // channel: path(txt) | ||
go_banding // channel: path(txt) | ||
|
||
main: | ||
|
||
ch_versions = Channel.empty() | ||
|
||
|
||
GENERATEGAF( ch_ips ) | ||
ch_versions = ch_versions.mix(GENERATEGAF.out.versions.first()) | ||
|
||
OWLTOOLS ( | ||
GENERATEGAF.out.gaf, | ||
go_obo, | ||
goslim_ids | ||
) | ||
ch_versions = ch_versions.mix(OWLTOOLS.out.versions.first()) | ||
|
||
SUMMARISEGOSLIMS ( | ||
ch_ips, | ||
OWLTOOLS.out.gaf, | ||
go_obo, | ||
go_banding | ||
) | ||
ch_versions = ch_versions.mix(SUMMARISEGOSLIMS.out.versions.first()) | ||
|
||
emit: | ||
go_summary = SUMMARISEGOSLIMS.out.go_summary // channel: [ val(meta), path(csv) ] | ||
goslim_summary = SUMMARISEGOSLIMS.out.goslim_summary // channel: [ val(meta), path(csv) ] | ||
versions = ch_versions // channel: [ versions.yml ] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json | ||
name: "goslim_swf" | ||
description: Get GO term and GO-slim term counts out of an InterProScan .tsv output file | ||
keywords: | ||
- GO | ||
- GO-slim | ||
- interpro | ||
- interproscan | ||
- owltools | ||
components: | ||
- generategaf | ||
- owltools | ||
- summarisegoslims | ||
input: | ||
- ch_ips: | ||
type: file | ||
description: | | ||
The input channel containing the InterProScan output file | ||
Structure: [ val(meta), path(tsv) ] | ||
pattern: "*.tsv" | ||
- go_obo: | ||
type: file | ||
description: Gene ontology .OBO file, for example go-basic. Can usually be downloaded here https://geneontology.org/docs/download-ontology/ | ||
pattern: "*.go" | ||
- goslim_ids: | ||
type: file | ||
description: txt file containing the GO terms that make up the input GO-slim | ||
pattern: "*.txt" | ||
- go_banding: | ||
type: file | ||
description: txt file containing the GO terms and descriptions that make up the input GO-slim | ||
pattern: "*.txt" | ||
output: | ||
- go_summary: | ||
type: file | ||
description: | | ||
Channel containing GO term counts | ||
Structure: [ val(meta), path(csv) ] | ||
pattern: "*_summary.csv" | ||
- goslim_summary: | ||
type: file | ||
description: | | ||
Channel containing GO-slim term counts | ||
Structure: [ val(meta), path(csv) ] | ||
pattern: "*_slim.csv" | ||
- versions: | ||
type: file | ||
description: | | ||
File containing software versions | ||
Structure: [ path(versions.yml) ] | ||
pattern: "versions.yml" | ||
authors: | ||
- "@chrisata" | ||
maintainers: | ||
- "@chrisata" |
39 changes: 39 additions & 0 deletions
39
subworkflows/ebi-metagenomics/goslim_swf/tests/main.nf.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
nextflow_workflow { | ||
|
||
name "Test Subworkflow GOSLIM_SWF" | ||
script "../main.nf" | ||
workflow "GOSLIM_SWF" | ||
config "./nextflow.config" | ||
|
||
tag "subworkflows" | ||
tag "subworkflows_ebimetagenomics" | ||
tag "subworkflows/goslim_swf" | ||
tag "generategaf" | ||
tag "owltools" | ||
tag "summarisegoslims" | ||
|
||
test("goslim_swf") { | ||
|
||
when { | ||
workflow { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file("${baseDir}/modules/ebi-metagenomics/generategaf/tests/ips_out.tsv", checkIfExists: true) | ||
] | ||
input[1] = file("${baseDir}/modules/ebi-metagenomics/owltools/tests/go-dummy.obo", checkIfExists: true) | ||
input[2] = file("${baseDir}/modules/ebi-metagenomics/owltools/tests/goslim_ids.txt", checkIfExists: true) | ||
input[3] = file("${baseDir}/modules/ebi-metagenomics/summarisegoslims/tests/goslim_banding_2024.txt", checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success}, | ||
{ assert snapshot(workflow.out).match()} | ||
) | ||
} | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
subworkflows/ebi-metagenomics/goslim_swf/tests/main.nf.test.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"goslim_swf": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_summary.csv:md5,ddf9aa47da0a848795fffb56d9ac3c96" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_summary_slim.csv:md5,ce50e0507a12ef0d70bd41b14926c5d5" | ||
] | ||
], | ||
"2": [ | ||
"versions.yml:md5,9803d78712ef1091ff5f785e34209e66", | ||
"versions.yml:md5,db47fe42ea02f1cd3ecc4074727e8972", | ||
"versions.yml:md5,f7674bdfeee9a4d98dbb33e474dd7a68" | ||
], | ||
"go_summary": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_summary.csv:md5,ddf9aa47da0a848795fffb56d9ac3c96" | ||
] | ||
], | ||
"goslim_summary": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test_summary_slim.csv:md5,ce50e0507a12ef0d70bd41b14926c5d5" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,9803d78712ef1091ff5f785e34209e66", | ||
"versions.yml:md5,db47fe42ea02f1cd3ecc4074727e8972", | ||
"versions.yml:md5,f7674bdfeee9a4d98dbb33e474dd7a68" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.4" | ||
}, | ||
"timestamp": "2025-01-28T22:32:17.095895573" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
subworkflows/ebi-metagenomics/goslim_swf/tests/nextflow.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
process{ | ||
|
||
withName: OWLTOOLS { | ||
ext.args = '--map2slim' | ||
} | ||
|
||
} |