From 1b65f91214e61a755671475db8e0de708d7ed27b Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 1 Feb 2022 13:14:24 -0500 Subject: [PATCH] Fix tabs, improve setup documentation to be explicit about vscode Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- _episodes/03-running.md | 35 ++++++++++++++------------- assets/css/lesson.scss | 6 +++++ assets/img/Explorer.png | Bin 0 -> 1213 bytes assets/js/tabs.js | 9 +++++-- setup.md | 51 ++++++++++++++++++++++++---------------- 5 files changed, 63 insertions(+), 38 deletions(-) create mode 100644 assets/img/Explorer.png diff --git a/_episodes/03-running.md b/_episodes/03-running.md index e9f740a..9229172 100644 --- a/_episodes/03-running.md +++ b/_episodes/03-running.md @@ -31,8 +31,7 @@ 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). -{% assign tabs = "generic, arvados" | split: ", " %} -{% capture generic_tab_content %} +{% capture generic_input_tab_content %} main-input.yaml ``` fq: @@ -63,7 +62,7 @@ gtf: {: .challenge } {% endcapture %} -{% capture arvados_tab_content %} +{% capture arvados_input_tab_content %} main-input.yaml ``` fq: @@ -89,13 +88,12 @@ gtf:
-
{{ generic_tab_content | markdownify}}
-
{{ arvados_tab_content | markdownify}}
+
{{ generic_input_tab_content | markdownify}}
+
{{ arvados_input_tab_content | markdownify}}
# Debugging the workflow @@ -171,10 +169,8 @@ Resource requirements you can set include: The CWL runner will print a results JSON object to standard output. It will look something like this (it may include additional fields). -
-{% tabs output %} +{% capture generic_output_tab_content %} -{% tab output generic %} ``` { "bam_sorted_indexed": { @@ -200,9 +196,9 @@ The CWL runner will print a results JSON object to standard output. It will loo } ``` {: .language-yaml } -{% endtab %} +{% endcapture %} -{% tab output arvados %} +{% capture arvados_output_tab_content %} ``` { "bam_sorted_indexed": { @@ -227,11 +223,18 @@ The CWL runner will print a results JSON object to standard output. It will loo } ``` {: .language-yaml } -{% endtab %} -{% endtabs %} +{% endcapture %} + +
+ + +
{{ generic_output_tab_content | markdownify}}
+
{{ arvados_output_tab_content | markdownify}}
This has a similar structure as `main-input.yaml`. The each output parameter is listed, with the `location` field of each `File` object indicating where the output file can be found. - diff --git a/assets/css/lesson.scss b/assets/css/lesson.scss index 9334e37..d19fa2b 100644 --- a/assets/css/lesson.scss +++ b/assets/css/lesson.scss @@ -227,6 +227,12 @@ article img { max-width: 100%; } +li img { + display: inline; + margin: 3px auto; + max-width: 100%; +} + article h2 { margin: 48px 0 16px; border-bottom: solid 1px #eaecef; diff --git a/assets/img/Explorer.png b/assets/img/Explorer.png new file mode 100644 index 0000000000000000000000000000000000000000..f91128b136970770e7a0a5fc7d3e2d45cb93f36e GIT binary patch literal 1213 zcmV;u1Va0XP)EX>4Tx062|}R7+?RQ4~E%t*upTEk#sBf|UB92{CD{f=FvqYao@_refUG$;{-V zndvYyX%$4ea#L_Aiko7QZe6w8F2tqahYGGlMBEEqs5PGVW^AG~(i!gD^X|L9ckg`z zG`}mWhO;9I7^Z8Fk6s8}%U%z)d`19m=s*-l6xFeY(&-c$KI?1L=JPfze9b@k6;PLs zwZ2{`+`Tft?^9zt`RvtnM+E}C#4**fUE&+W_h(&8;IG78YEjXMe-iiFOb`ej7xJ8k z&k0=ca9UtHGd@gA8*~)vaIOxkMcW`|40Id1s}MgTt!akI{bq~uh-PR4FNoZXaz*uX z7N^~#o0Ajd`$>n9zz9-&LzqMieK^JM7;Cz<%}r^OK@lZ5w6S1g8hNhD(7E=cc}jJ; z7JDJwf=M*XZwM-pg*((Jp+G+_WkTB_5;B#%L>-fo2q1d;Z?BwuJmzJ#dxd9wSgn4$ z3bdR6Hr`jOKbEW2jb}j92Vix*W^eJlXA_h!)@0pFKzkNgo~y}nhkzBH{opQ3v6ank z2jg+C?tGfWXK@wC%mFF#$K*Yv_Cc+ry1qr5=oRU?U+b5mj-)sKTFl1*ue|6YC*dUd zd2c_E@z?h}KY<72gXFKsJIOzi?-#`uW|CH{`!UVGt6#Z z#1v-O1DiGXY9D9qM&vlaX;hf0 z&Qs;-xu3b~)XS01@EfI$MwvpcP!j#ipGh0nzc2N2k*CgzY<-gw7-D6HWc8+b9-DD> z8MQdlQ3S(>JVR{ph%8ZeuOl5z<4dR9ycBnpg;khEK zBI;a`H__fAN~8Zlr~ePxuKs`jIlloU?egLubUc9o000JJOGiWi000000Qp0^e*gdg z32;bRa{vG?BLDy{BLR4&KXw2B00(qQO+^Rg0s<8s3SYoq;{X5v8FWQhbVF}#ZDnqB z07G(RVRU6=Aa`kWXdp*PO;A^X4i^9b0U}96K~z}7?U%iZgfJ9FKV<|F3qdT>TH2%# zvCh!D4jR8E4(K$k!z|fg_&W5Xp7j4_qKJE)oH9S&-Y& zjkaxrQu=Lu7zV^~jHYSM1JN`Mlu{%~f^i&Ib;ogFnkIrEcpByqh%A5o(WJ&ocnPvaHP({}@S^82bKU4 bATQ<<;W&PLBPyy?00000NkvXXu0mjfCPyi7 literal 0 HcmV?d00001 diff --git a/assets/js/tabs.js b/assets/js/tabs.js index 0e5b795..2a72abd 100644 --- a/assets/js/tabs.js +++ b/assets/js/tabs.js @@ -1,6 +1,9 @@ window.addEventListener('load', function() { // Get relevant elements and collections - const tabbed = document.querySelector('.tabbed'); + const allTabbed = document.querySelectorAll('.tabbed'); + + allTabbed.forEach((tabbed) => { + const tablist = tabbed.querySelector('ul'); const tabs = tablist.querySelectorAll('a'); const panels = tabbed.querySelectorAll('[id^="section"]'); @@ -74,4 +77,6 @@ window.addEventListener('load', function() { tabs[0].setAttribute('aria-selected', 'true'); tabs[0].setAttribute('class', 'active'); panels[0].hidden = false; -}); + }); +} +); diff --git a/setup.md b/setup.md index 4e144c2..8a30e91 100644 --- a/setup.md +++ b/setup.md @@ -2,9 +2,7 @@ title: Setup --- -
-{% tabs setup %} -{% tab setup generic %} +{% capture generic_tab_content %} # Setting up a practice repository @@ -75,24 +73,29 @@ cwl-runner bio-cwl-tools/STAR/STAR-Index.cwl chr1-star-index.yaml ``` {: .language-bash } +{% endcapture %} -{% endtab %} - -{% tab setup arvados %} +{% capture arvados_tab_content %} # Setting up a practice repository We will create a new git repository and import a library of existing tool definitions that will help us build our workflow. -When using the recommended VSCode environment to develop on Arvados, start by forking this repository: -``` -git clone https://github.com/arvados/arvados-vscode-cwl-template.git rnaseq-cwl-training-exercises -``` -{: .language-bash } +When using the recommended [VSCode environment to develop on Arvados](https://doc.arvados.org/v2.3/user/cwl/arvados-vscode-training.html), +start by forking the +[arvados-vscode-cwl-template](https://github.com/arvados/arvados-vscode-cwl-template) +repository. -Next, import bio-cwl-tools with this command: +1. Vscode: On the left sidebar, choose `Explorer` ![](../assets/img/Explorer.png) +1. Select `Clone Repository` and enter [https://github.com/arvados/arvados-vscode-cwl-template](https://github.com/arvados/arvados-vscode-cwl-template), then click `Open` +1. If asked `Would you like to open the cloned repository?` choose `Open` +Next, import the [bio-cwl-tools](https://github.com/common-workflow-library/bio-cwl-tools) repository: + +1. Vscode: In the top menu, select `Terminal` → `New Terminal` +1. This will open a terminal window in the lower part of the screen +1. Run this command: ``` git submodule add https://github.com/common-workflow-library/bio-cwl-tools.git ``` @@ -110,7 +113,12 @@ git submodule add https://github.com/common-workflow-library/bio-cwl-tools.git > you do not need to perform this download step. {: .callout} -Use `arv-copy` to copy the collection: +1. Go to https://workbench2.jutro.arvadosapi.com and sign in, this will create an account +2. Go to `Get an API token` under the user menu +3. Log into the shell node of your Arvados cluster +4. On the shell node, copy the host name and token for the 'jutro' cluster into the file `~/.config/arvados/jutro.conf` as described on the page for [arv-copy](https://doc.arvados.org/user/topics/arv-copy.html). + +Now, on shell node of your Arvados cluster, use `arv-copy` to copy the collection: ``` arv-copy --src jutro 9178fe1b80a08a422dbe02adfd439764+925 @@ -163,13 +171,16 @@ arvados-cwl-runner bio-cwl-tools/STAR/STAR-Index.cwl chr1-star-index.yaml ``` {: .language-bash } -## Sneak peak -If you want to jump ahead, here are links to some of the CWL concepts you just used - - [YAML array] (https://www.commonwl.org/user_guide/yaml/#arrays) - - [CWL array inputs] (https://www.commonwl.org/user_guide/09-array-inputs/index.html) - -{% endtab %} -{% endtabs %} +{% endcapture %} + +
+ + +
{{ generic_tab_content | markdownify}}
+
{{ arvados_tab_content | markdownify}}
{% include links.md %} -- 2.30.2