Show arvados sections by default, instead of generic ones.
[rnaseq-cwl-training.git] / _episodes / 03-running.md
index f3c9779dae1f1ce5c072d9ab97edf6f3e29aa52d..9c627149e201d1b8a64aa73ddc439f38a5bc8791 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: "Running and Debugging a Workflow"
-teaching: 10
+teaching: 15
 exercises: 20
 questions:
 - "How do I provide input to run a workflow?"
@@ -31,8 +31,8 @@ plain strings that may or may not be file paths.
 
 Note: if you don't have example sequence data or the STAR index files, see [setup](/setup.html).
 
+{% capture generic_input_tab_content %}
 main-input.yaml
-
 ```
 fq:
   class: File
@@ -54,13 +54,47 @@ gtf:
 > ```
 > cwl-runner main.cwl main-input.yaml
 > ```
+> {: .language-bash }
 >
 > This may take a few minutes to run, and will print some amount of
 > logging.  The logging you see, how access other logs, and how to
 > track workflow progress will depend on your CWL runner platform.
+{: .challenge }
+{% endcapture %}
+
+{% capture arvados_input_tab_content %}
+main-input.yaml
+```
+fq:
+  class: File
+  location: keep:9178fe1b80a08a422dbe02adfd439764+925/raw_fastq/Mov10_oe_1.subset.fq
+  format: http://edamontology.org/format_1930
+genome:
+  class: Directory
+  location: keep:02a12ce9e2707610991bd29d38796b57+2912
+gtf:
+  class: File
+  location: keep:9178fe1b80a08a422dbe02adfd439764+925/reference_data/chr1-hg19_genes.gtf
+```
+{: .language-yaml }
+
+> ## Running the workflow
+>
+> If you are using VSCode with Arvados tasks, select `main.cwl` and
+> then use the `Run CWL Workflow on Arvados` task.
 >
-> {: .language-bash }
 {: .challenge }
+{% endcapture %}
+
+<div class="tabbed">
+  <ul class="tab">
+      <li><a href="#section-arvados-input">arvados</a></li>
+      <li><a href="#section-generic-input">generic</a></li>
+  </ul>
+
+  <section id="section-arvados-input">{{ arvados_input_tab_content | markdownify}}</section>
+  <section id="section-generic-input">{{ generic_input_tab_content | markdownify}}</section>
+</div>
 
 # Debugging the workflow
 
@@ -121,12 +155,22 @@ Resource requirements you can set include:
 * tmpdirMin: temporary directory available space
 * outdirMin: output directory available space
 
-After setting the RAM requirements, re-run the workflow.
+> ## Running the workflow
+>
+> Now that you've fixed the workflow, run it again.
+>
+{: .challenge }
+
+> ## Episode solution
+> * <a href="../assets/answers/ep3/main.cwl">main.cwl</a>
+{: .solution}
 
 # Workflow results
 
 The CWL runner will print a results JSON object to standard output.  It will look something like this (it may include additional fields).
 
+{% capture generic_output_tab_content %}
+
 ```
 {
     "bam_sorted_indexed": {
@@ -152,6 +196,44 @@ The CWL runner will print a results JSON object to standard output.  It will loo
 }
 ```
 {: .language-yaml }
+{% endcapture %}
+
+{% capture arvados_output_tab_content %}
+```
+{
+    "bam_sorted_indexed": {
+        "basename": "Aligned.sortedByCoord.out.bam",
+        "class": "File",
+        "location": "keep:2dbaaef5aefd558e37f14280e47091a9+327/Aligned.sortedByCoord.out.bam",
+        "secondaryFiles": [
+            {
+                "basename": "Aligned.sortedByCoord.out.bam.bai",
+                "class": "File",
+                "location": "keep:2dbaaef5aefd558e37f14280e47091a9+327/Aligned.sortedByCoord.out.bam.bai"
+            }
+        ],
+        "size": 25370695
+    },
+    "qc_html": {
+        "basename": "Mov10_oe_1.subset_fastqc.html",
+        "class": "File",
+        "location": "keep:2dbaaef5aefd558e37f14280e47091a9+327/Mov10_oe_1.subset_fastqc.html",
+        "size": 383589
+    }
+}
+```
+{: .language-yaml }
+{% endcapture %}
+
+<div class="tabbed">
+  <ul class="tab">
+      <li><a href="#section-arvados-output">arvados</a></li>
+      <li><a href="#section-generic-output">generic</a></li>
+  </ul>
+
+  <section id="section-arvados-output">{{ arvados_output_tab_content | markdownify}}</section>
+  <section id="section-generic-output">{{ generic_output_tab_content | markdownify}}</section>
+</div>
 
 This has a similar structure as `main-input.yaml`.  The each output
 parameter is listed, with the `location` field of each `File` object