diff --git a/subworkflows/local/functional_annotation/meta.yml b/subworkflows/local/functional_annotation/meta.yml new file mode 100644 index 0000000..831e917 --- /dev/null +++ b/subworkflows/local/functional_annotation/meta.yml @@ -0,0 +1,63 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "FUNCTIIONAL_ANNOTATIONS" +description: Perform local functional annotation on protien sequences +keywords: + - fasta + - sequences + - functional + - domain + - annotation + - database + - download + - HMM +components: + - aria2 + - hmmer/hmmsearch +input: + - ch_fasta: + type: file + description: | + Amino acid fasta file containing amino acid sequences for annotation + Structure: [ val(meta), [ path(fasta) ] ] + - skip_pfam: + type: boolean + description: | + Skip domain annotation with Pfam + - pfam_db: + type: string + description: | + Path to an existing HMM Pfam library on the system. If provided, the ARIA2_PFAM db download will be skipped. + - pfam_latest_link: + type: string + description: | + Path to the latest Pfam HMM database, to download + - skip_funfam: + type: boolean + description: | + Skip domain annotation with FunFam + - funfam_db: + type: string + description: | + Path to an existing HMM FunFam library on the system. If provided, the ARIA2_FUNFAM db download will be skipped. + - funfam_latest_link: + type: string + description: | + Path to the latest FunFam HMM database, to download +output: + - pfam_domains: + type: file + description: | + domtbl.gz files with pfam domain annotation for input amino acid sequences + - funfam_domains: + type: file + description: | + domtbl.gz files with funfam domain annotation for input amino acid sequences + - versions: + type: file + description: | + Versions file containing the software versions used in the workflow +authors: + - "@vagkaratzas" + - "@Muskan-2464" +maintainers: + - "@vagkaratzas" diff --git a/tests/nf test b/tests/nf test new file mode 100644 index 0000000..7547264 --- /dev/null +++ b/tests/nf test @@ -0,0 +1,33 @@ +nextflow_workflow { + + name "Test Subworkflow functional_annotation" + script "../main.nf" + workflow "FUNCTIIONAL_ANNOTATIONS" + + test("Should run functional annotation successfully") { + + when { + workflow { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + input[1] = false // skip_pfam + input[2] = [] // pfam_db + input[3] = "https://raw.githubusercontent.com/nf-core/test-datasets/multiqc/testdata/set_indices.txt" + input[4] = true // skip_funfam + input[5] = [] // funfam_db + input[6] = [] // funfam_latest_link + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match() } + ) + } + } +}