cwl-use-expressions

Implement dynamic behavior in CWL workflows using JavaScript and CWL expressions.

30|6|Updated Mar 5, 2019
One-click install
npx skills add https://github.com/crim-ca/weaver --skill cwl-use-expressions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cwl-use-expressions
Source: https://github.com/crim-ca/weaver/tree/main/.agents/skills/cwl-use-expressions
Command: npx skills add https://github.com/crim-ca/weaver --skill cwl-use-expressions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cwltool, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of implementing dynamic, computed, and conditional behavior in CWL processes, allowing for more flexible and powerful workflows.

Core Features & Use Cases

  • Dynamic Parameter Transformation: Apply JavaScript and CWL expressions to transform input parameters.
  • Conditional Logic: Implement decision-making within workflows using CWL expressions.
  • Computed Values: Generate computed values for outputs or parameters dynamically.
  • Use Case: For instance, you can use this Skill to dynamically generate output file names based on input file names or to calculate parameters based on input values.

Quick Start

Use the cwl-use-expressions skill to double the value of an input parameter.

Frequently Asked Questions about cwl-use-expressions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use JavaScript expressions in CWL workflows for dynamic parameter transformation?

You can use JavaScript expressions in CWL workflows to dynamically transform input parameters by leveraging the InlineJavascriptRequirement, which enables computed values and conditional logic directly within your CWL package definitions.

Can I implement conditional logic in Common Workflow Language to control process execution?

Yes, you can implement conditional logic in Common Workflow Language by applying CWL expressions and JavaScript, allowing you to introduce decision-making and dynamic behavior within your workflow processes.

What is the best way to dynamically generate output file names based on inputs in CWL?

The best way to dynamically generate output file names in CWL is by using JavaScript expressions to compute values, allowing you to derive output names directly from input file names or other input parameters.

Does cwltool support InlineJavascriptRequirement for computed workflow values?

Yes, cwltool supports InlineJavascriptRequirement, which is required to execute CWL v1.0+ packages that utilize JavaScript and CWL expressions for computing values and transforming parameters dynamically.

Why do I need InlineJavascriptRequirement to run dynamic CWL workflows?

You need InlineJavascriptRequirement because it is the specific CWL v1.0+ standard extension that enables the runtime evaluation of JavaScript expressions for parameter transformation and conditional logic within your workflows.

What are the limitations of using JavaScript expressions in CWL for workflow logic?

Using JavaScript expressions in CWL is limited to parameter transformation, conditional logic, and computed values within the process definition, and requires CWL v1.0+ with InlineJavascriptRequirement support to function properly.