Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions subworkflows/local/functional_annotation/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "functional_annotation"
description: Functional annotation of proteins using InterProScan
keywords:
- fasta
- annotation
- functional
components:
- interproscan
- aria2
- untar
input:
- ch_fasta:
type: file
description: The input channel containing the fasta files
structure: [ val(meta), path(fasta) ]
pattern: "*.{fa,fasta,fa.gz,fasta.gz}"
- skip_interproscan:
type: boolean
description: Skip functional annotation with InterProScan
- interproscan_db_url:
type: string
description: URL to download the InterProScan database
- interproscan_db:
type: string
description: Path to an existing InterProScan library
output:
- interproscan_tsv:
type: file
description: TSV files with InterProScan functional annotation
structure: [ val(meta), path(tsv) ]
pattern: "*.tsv"
- versions:
type: file
description: File containing software versions
structure: [ path(versions.yml) ]
pattern: "versions.yml"
authors:
- "@Muskan"
maintainers:
- "@Muskan"
- "@vagkaratzas"
37 changes: 37 additions & 0 deletions subworkflows/local/functional_annotation/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
nextflow_workflow {

name "Test Subworkflow FUNCTIONAL_ANNOTATION"
script "../main.nf"
workflow "FUNCTIONAL_ANNOTATION"

tag "subworkflows"
tag "subworkflows_local"
tag "subworkflows/functional_annotation"

test("Test functional annotation with single fasta") {

when {
params {
pipelines_testdata_base_path = "https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/"
}
workflow {
"""
input[0] = Channel.fromList([
[ [ id:'test' ], file(params.pipelines_testdata_base_path + 'proteinannotator/reference/snap25_isoforms_bc12_ced9.fasta', checkIfExists: true) ]
])
input[1] = true // skip_interproscan
input[2] = 'https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealignment/testdata/dummy_db.tar.gz'
input[3] = null // interproscan_db
"""
}
}

then {
assertAll(
{ assert workflow.success },
// This checks that the output exists and matches our mock snapshot
{ assert snapshot(workflow.out.interproscan_tsv, workflow.out.versions).match() }
)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Should run functional annotation with InterProScan": {
"content": [

],
"timestamp": "2026-03-13T12:00:00"
}
}
10 changes: 10 additions & 0 deletions subworkflows/local/functional_annotation/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
params {
// This defines the test dataset location for the subworkflow
test_data = [
'sarscov2': [
'genome': [
'proteome_fasta': 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/sarscov2/genome/proteome.fasta'
]
]
]
}
Loading