From acb7fe30ec70a1c8131e4aa00a3702d0d9034f11 Mon Sep 17 00:00:00 2001 From: Adrian Altenhoff Date: Mon, 9 Dec 2024 16:40:11 +0100 Subject: [PATCH] minor fixes on schemawith the workflow --- main.nf | 46 +++++++++++++++-------------- nextflow.config | 2 +- nextflow_schema.json | 70 ++++++++++++++++++++++++++++---------------- 3 files changed, 70 insertions(+), 48 deletions(-) diff --git a/main.nf b/main.nf index c60188b..d81e685 100644 --- a/main.nf +++ b/main.nf @@ -11,13 +11,13 @@ def logo() { c_cyan = "\033[0;36m"; c_white = "\033[0;37m"; - return """ ${c_dim}----------------------------------------------------${c_reset}${c_green} - ____ __ ______ - / __ \\/ |/ / | - / / / / /|_/ / /| | - / /_/ / / / / ___ | - \\____/_/ /_/_/ |_| - ${c_reset}${c_dim}----------------------------------------------------${c_reset}""".stripIndent() + return """ ${c_dim}------------------------------------------------------------------------------${c_reset}${c_green} + ____ __ ______ ____ ____ _ __ __ + / __ \/ |/ / | / __ )_________ _ __________ _____ / __ )__ __(_) /___/ / + / / / / /|_/ / /| | / __ / ___/ __ \ | /| / / ___/ _ \/ ___/ / __ / / / / / / __ / + / /_/ / / / / ___ | / /_/ / / / /_/ / |/ |/ (__ ) __/ / / /_/ / /_/ / / / /_/ / + \____/_/ /_/_/ |_| /_____/_/ \____/|__/|__/____/\___/_/ /_____/\__,_/_/_/\__,_/ + ${c_reset}${c_dim}------------------------------------------------------------------------------${c_reset}""".stripIndent() } // Print the logo @@ -26,11 +26,11 @@ log.info logo() // Load Plugins include { validateParameters; paramsHelp; paramsSummaryLog } from 'plugin/nf-schema' - // Print help message if needed - if (params.help){ - log.info paramsHelp("nextflow run main.nf required [optional]") - exit 0 - } +// Print help message if needed +if (params.help){ + log.info paramsHelp("nextflow run main.nf required [optional]") + exit 0 +} // Validate input parameters validateParameters() @@ -63,19 +63,21 @@ output { { file -> "data/OmaServer.h5" } } } + + 'data' { mode 'copy'} } workflow { OMA_browser_build() -} -workflow.onComplete { - println "Pipeline completed at: ${workflow.complete}" - println "Time to complete workflow execution: ${workflow.duration}" - println "Execution status: ${workflow.success ? 'Successful' : 'Failed'}" - println "Reports stored in ${params.outputDir}/reports/nextflow" -} + workflow.onComplete { + println "Pipeline completed at: ${workflow.complete}" + println "Time to complete workflow execution: ${workflow.duration}" + println "Execution status: ${workflow.success ? 'Successful' : 'Failed'}" + println "Reports stored in ${params.outputDir}/reports/nextflow" + } -workflow.onError { - println "Error... Pipeline execution stopped with the following message: $workflow.errorMessage" -} + workflow.onError { + println "Error... Pipeline execution stopped with the following message: $workflow.errorMessage" + } +} \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index 4252807..9ce8966 100644 --- a/nextflow.config +++ b/nextflow.config @@ -1,6 +1,6 @@ // Nextflow configuration nextflow.enable.moduleBinaries = true // Enables the use of modules with binary scripts - +nextflow.preview.output = true // Enables publish/output section for workflows // Global default params params { diff --git a/nextflow_schema.json b/nextflow_schema.json index 3dfc073..625b27f 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -1,26 +1,10 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "http://json-schema.org/draft-07/schema", "$id": "https://raw.githubusercontent.com/oma-browser-build/master/nextflow_schema.json", "title": "oma-browser-build pipeline parameters", "description": "Convert OMA run into OMA Browser release", "type": "object", - "defs": { - "input_output_options": { - "title": "Input/output options", - "type": "object", - "fa_icon": "fas fa-terminal", - "description": "Define where the pipeline should find input data and save output data.", - "required": ["outdir"], - "properties": { - "outdir": { - "type": "string", - "format": "directory-path", - "description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.", - "fa_icon": "fas fa-folder-open", - "default": "./results" - } - } - }, + "definitions": { "generic_options": { "title": "Generic options", "type": "object", @@ -39,27 +23,63 @@ }, "allOf": [ { - "$ref": "#/defs/input_output_options" - }, - { - "$ref": "#/defs/generic_options" + "$ref": "#/definitions/generic_options" } ], "properties": { - "orthoxml": { + "hog_orthoxml": { "type": "string" }, - "genomes": { + "matrix_file": { "type": "string" }, + "pairwise_orthologs_folder": { + "type": "string" + }, + "genomes_dir": { + "type": "string" + }, + "known_domains": { + "type": "string" + }, + "cath_names_path": { + "type": "string", + "default": "http://download.cathdb.info/cath/releases/latest-release/cath-classification-data/cath-names.txt" + }, + "pfam_names_path": { + "type": "string", + "default": "https://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.clans.tsv.gz" + }, + "xref_uniprot_swissprot": { + "type": "string", + "default": "https://ftp.ebi.ac.uk/pub/databases/uniprot/knowledgebase/uniprot_sprot.dat.gz" + }, + "xref_uniprot_trembl": { + "type": "string", + "default": "/dev/null" + }, + "xref_refseq": { + "type": "string" + }, + "go_obo": { + "type": "string", + "default": "http://purl.obolibrary.org/obo/go/go-basic.obo" + }, + "go_gaf": { + "type": "string", + "default": "https://ftp.ebi.ac.uk/pub/databases/GO/goa/UNIPROT/goa_uniprot_all.gaf.gz" + }, "oma_browser_data_dir": { "type": "string", - "format": "directory-path", "default": "test/bla" }, "nr_medium_procs": { "type": "integer", "default": 10 + }, + "outputDir": { + "type": "string", + "default": "./results" } } }