Skip to content

Commit

Permalink
minor fixes on schemawith the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Dec 9, 2024
1 parent cb33af8 commit acb7fe3
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 48 deletions.
46 changes: 24 additions & 22 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
70 changes: 45 additions & 25 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
}
}
}

0 comments on commit acb7fe3

Please sign in to comment.