Merge pull request #9 from common-workflow-lab/ALuesink-patch-1
[rnaseq-cwl-training.git] / _episodes / 06-expressions.md
index cf26be425496654fd02c45aea3707e1a65f31066..5bf1782d8010c69770a92af82fd5ce8b4ae12c84 100644 (file)
@@ -1,13 +1,15 @@
 ---
 title: "Dynamic Workflow Behavior"
 teaching: 20
-exercises: 0
+exercises: 10
 questions:
-- "How can I adjust workflow behavior at runtime?"
+- "What kind of custom logic can happen between steps?"
 objectives:
-- "Set "
+- "Customize the STAR output filename to use the input filename."
+- "Organize files into directories."
 keypoints:
-- "First key point. Brief Answer to questions. (FIXME)"
+- "CWL expressions allow you to use custom logic to determine input parameter values."
+- "CWL ExpressionTool can be used to reshape data, such as declaring directories that should contain output files."
 ---
 
 # Expressions on step inputs
@@ -94,7 +96,7 @@ assignment (`=`), which cannot include control blocks like `if` or
 `for`.  The `${}` form is a Javascript function, which can include
 control blocks, and must end in a `return` statement.
 
-Dxpressions can both appear in `valueFrom` fields as well as some
+Expressions can both appear in `valueFrom` fields as well as some
 other fields, or in an `ExpressionTool` which, like `Workflow` or
 `CommandLineTool` has explicitly defined `inputs` and `outputs`
 sections.
@@ -154,3 +156,18 @@ outputs:
     outputSource: featureCounts/featurecounts
 ```
 {: .language-yaml }
+
+> ## Running the workflow
+>
+> Run the workflow.  Look at the output.  The BAM and fastqc files
+> should now be organized into directories, with better naming of the
+> bam files.
+>
+{: .challenge }
+
+> ## Episode solution
+> * <a href="../assets/answers/ep6/main.cwl">main.cwl</a>
+> * <a href="../assets/answers/ep6/alignment.cwl">alignment.cwl</a>
+> * <a href="../assets/answers/ep6/featureCounts.cwl">featureCounts.cwl</a>
+> * <a href="../assets/answers/ep6/subdirs.cwl">subdirs.cwl</a>
+{: .solution}