Skip to content

Commit

Permalink
some cleaning and making validParameters() work
Browse files Browse the repository at this point in the history
  • Loading branch information
toniher committed Oct 23, 2024
1 parent 450c62b commit c4e716c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
10 changes: 3 additions & 7 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ version = '2.0.0'
* Input parameters:
*/

params.resume = false
// params.resume = false


log_main = """
Expand Down Expand Up @@ -82,9 +82,7 @@ reclustered gene orthology file : ${params.sub_orthologs}
"""

include { paramsHelp; paramsSummaryMap; validateParameters } from 'plugin/nf-schema'

if (params.resume) exit 1, "Are you making the classical --resume typo? Be careful!!!! ;)"
include { paramsHelp; validateParameters } from 'plugin/nf-schema'

// if( !workflow.resume ) {
// println "Removing the output folder"
Expand All @@ -101,11 +99,9 @@ include { SCORE } from "${LOCAL_SUBWORKFLOWS}/score.nf"

include { PLOT } from "${WORKFLOWS}/plot.nf"

// println paramsSummaryMap(workflow)

workflow {

// validateParameters()
validateParameters()

if (params.wf == "plot" ) {
log.info(log_plot)
Expand Down
15 changes: 5 additions & 10 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"description": "",
"default": "",
"properties": {
"resume": {
"type": "string",
"description": "Convenient param for detecting resume mistake"
},
"wf": {
"type": "string",
"description": "Workflow to be run, by default the main one. Alternative is plot",
Expand All @@ -35,13 +31,13 @@
"annotations": {
"type": "string",
"description": "Path to GTF annotation files",
"format": "file-path",
"format": "file-path-pattern",
"default": "./test/GTF/*_annot-subsetted.gtf.gz"
},
"genomes": {
"type": "string",
"description": "Path to fasta genome files",
"format": "file-path",
"format": "file-path-pattern",
"default": "./test/GENOMES/*_gDNA-subsetted.fasta.gz"
},
"cluster": {
Expand Down Expand Up @@ -128,7 +124,7 @@
}
},
"plot_parameters": {
"title": "Plot parameters",
"title": "Plot Parameters",
"type": "object",
"description": "Specific parameters for generating plots",
"default": "",
Expand Down Expand Up @@ -161,7 +157,7 @@
"output_plot": {
"type": "string",
"description": "Path where to store resulting plot",
"format": "file-path",
"format": "directory-path",
"default": "./output_plot"
}
}
Expand All @@ -173,8 +169,7 @@
"email": {
"type": "string",
"description": "Email for notification",
"format": "email",
"default": "[email protected]"
"format": "email"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion params.config.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ params {
short_dist = "2,0.50,0.60,0.25"
prevaln = null
output = "$projectDir/output_test"
email = "[email protected]"
email = null
geneID = "ENSG00000159055"
output_plot = "$projectDir/output_plot"
relevant_exs = "chr21:32274830-32274896"
Expand Down

0 comments on commit c4e716c

Please sign in to comment.