Skip to content

Commit

Permalink
Remove preprocessParams from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DriesSchaumont committed Dec 27, 2024
1 parent 7f658b8 commit eca3418
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ private List<Tuple2<String, Map<String, Object>>> _paramsToParamSets(Map params,

/* combine arguments into channel */
/**********************************/

// Fetch default values for arguments
def defaultArgs = config.allArguments
.findAll { it.containsKey("default") }
.collectEntries { [ it.plainName, it.default ] }

def processedParams = paramSets.indexed().collect{ index, tup ->
// Process ID
def id = tup[0] ?: globalID
Expand All @@ -67,7 +73,7 @@ private List<Tuple2<String, Map<String, Object>>> _paramsToParamSets(Map params,
assert id != null: "Each parameter set should have at least an 'id'"

// Process params
def parValues = globalParams + tup[1]
def parValues = defaultArgs + globalParams + tup[1]
// // Remove parameters which are null, if the default is also null
// parValues = parValues.collectEntries{paramName, paramValue ->
// parameterSettings = config.functionality.allArguments.find({it.plainName == paramName})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
nextflow.enable.dsl=2

include { readConfig; helpMessage; preprocessInputs; channelFromParams } from "${params.rootDir}/workflows/utils/WorkflowHelper.nf"
include { readConfig; helpMessage; channelFromParams } from "${params.rootDir}/workflows/utils/WorkflowHelper.nf"
config = readConfig("${params.rootDir}/workflows/pipeline3/config.vsh.yaml")

workflow base {
helpMessage(config)

channelFromParams(params, config)
| preprocessInputs(["config": config])
| view {"DEBUG: $it"}
}

0 comments on commit eca3418

Please sign in to comment.