From 7a5f3ca8c3be0e4f8b3f397774b0739eb7e3e71d Mon Sep 17 00:00:00 2001 From: Dominik Brilhaus Date: Thu, 14 Nov 2024 16:24:50 +0100 Subject: [PATCH] finalize violas cwl --- public/violas-cwl.zip | Bin 0 -> 3950 bytes .../docs/guides/arc-cwl-wrap-script.mdx | 98 +++++++++++------- 2 files changed, 60 insertions(+), 38 deletions(-) create mode 100644 public/violas-cwl.zip diff --git a/public/violas-cwl.zip b/public/violas-cwl.zip new file mode 100644 index 0000000000000000000000000000000000000000..4236fca09fc5df679165ca05b674698a8575a32e GIT binary patch literal 3950 zcmbtW3pkW%8=i57&p${k-peKkxJ0bgHD38UjRK zEW=~=!-roA2yMiHJ>j7~`wje}LycUwEk?+MNSg(QLJwG@ViXWaDIOAmm<6EE0?8s| zMS!F<5C}CJcjySc1$wvsI{-VgI77=Jcsj!u3gqXF@(c9#^&WHF>NckAmPS7;k*OiMS_OkF z$EX~cM3Gt$F1^}yhb4*MF{Q|-QG}g?U`H~t3Tbu3bQT4#B)%o`%A(>45y@y4NF}Jh%{(+lO^L54k z{dt#R0l<#Xcna`VNu&Q6)t*2Ip6yd2fmo_Io2y%H~C_3pRLJ(^}^DOw}F zPU(&;=Xin}7i|>kBQxz)Q^9_ZS%t&2@^2IjC)zsS)40d7H7>rKtc}gDEDcwlMl##a z{z)aRvR1e}X!+7xIoh{IR`+gshXg2%^!IWON=V`21v&~d58kyt#e7hJPh^-+#9WEM zq=R)H@q&9{GEdZ{qR_J?BC2N}1P4F!U`KPvKu@T_XnVY9qGs13Slqg8LvnFQ`y+!m ztSbGe<4>MUg|{mD7HH#{6t<~-*L}+KEst1#m7CnD=V=_?n%$^ThEQa$v>K@^duKoR zhA`=uA#WZOaa2Y>x-}}2`OMC}=a=U9Lpx?B8vAdy3}64DH*=g}mHXJW;f`Cw3D>-U zSdZsBnX$WmE%iE6b)kUG+Q80jJfO~-NMy5hkBt{+>YA(%U3QGEiSOPx$AfN!$oq$+a{Sl)<~hQ`<2*K>)SB*|&@?v)!%M}*)9zG1N|iD& zLv8MP;#MEuraxD>;1*DO>~F2i0t_x4`7=EXg-ga>(rt88C8Xxt#R_i8C; zyLIO6KJB}i|N166#Kq*MSvL26oATQV{sE`e64}3<*ut)7p1W2cpN8#a>cZ#lRO1)pIuIyh} zy7hDgx%pI8UI@Fz=fS>yqxOufg!}taf5BgC;d>~?jk^u#*JK&rV-8!E22^#lU((gF zPLx5r{mc6+RFjY6lUJ{pc9~!EDm{q?kBP7Nf*u2*_neJG~R%?B`Qu9RdY`YEKb=Qnzl)syv8rLHsi)NdTN8J9gdbg1>! z)Hv?@zBkE4JFZP^nahgPZF;9(ERMt8UdFo;TIvw8$yDESCx*LGwg0Kb1*=203)*rIaE93E;nY7yKLRaedbeBkM`xx8uWxSd%})5f1&8|@#)i!) z@R@68n{F)6B&cmVNIS7aCt*7_&&;sXu+Xw3Q~x9%A9FA(OtWYycWe>GVRs+RD+fP4 zG-~N`Wm8(r65j9pjpuUBA6B;x<|X>c+CD$ZoV$wtXWP_+p01mD6hv0MTv z#F;KZie%9gUueMudVt0*Y!ZM8gM*WFUld(%08wQ=>kI@Z5gsBS2e2J*jFKIsK0y{d zQa&~=INgG2B{&winZh#?*bq24Nk56E`rk~6u>8Ue0KkKR3&$uKw@Bnf3);c#fj-j* z;7qVt79Iv*0K>saiWki!& -Click here to see what the ARC looks like - - - +## Example Data -You can also download the ARC (e.g. via [ARCitect](/nfdi4plants.knowledgebase/arcitect)) from the [DataHUB](https://git.nfdi4plants.org/training/AthalianaColdStressSugar). +This guide builds on the ARC created in the [Start here](/nfdi4plants.knowledgebase/start-here/) guide. +If you have not yet followed the guide, you can download the ARC (e.g. via [ARCitect](/nfdi4plants.knowledgebase/arcitect)) from the [DataHUB](https://git.nfdi4plants.org/training/AthalianaColdStressSugar). -::: - -## Scripts and CWL files +
+This is what the ARC looks like -We generate the following three files and place them in the ARC. + -
-
+
-File name | Description | Location in the ARC ---- | --- | --- -`heatmap.py` | Script used for data analysis | `workflows/heatmap/heatmap.py` -`workflow.cwl` | CWL document wrapping the `heatmap.py` | `workflows/heatmap/workflow.cwl` -`job.yml` | Yaml providing the parameters for `workflow.cwl` | `runs/heatmap-run/job.yml` +## Isolate run parameters and workflow - +We add the following three files to the ARC. You can **download the files here**. @@ -121,18 +110,47 @@ FigureFileName: heatmap -## Isolate run parameters and workflow + + +```mermaid +flowchart LR + +subgraph "workflow.cwl" + py@{ shape: doc, label: "heatmap.py" } +end + +sugar_result.csv -.- job.yml --o workflow.cwl--> heatmap.svg +``` + + + +Briefly summarized, + +- the `heatmap.py` is the example data analysis script, which creates a heatmap based on a CSV table input +- the `workflow.cwl` is a CWL document binds the `heatmap.py` + - It requires two `inputs` + 1. `MeasurementTableCSV`: the file name of the CSV table + 2. `FigureFileName`: how the user wants to name the output file + - And it generates one `output`: an `.svg` file named according to `FigureFileName` +- the `job.yml` provides the required `input` parameters for `workflow.cwl` + - the relative path to the CSV table input: `sugar_result.csv` + - the desired file name: `heatmap` + +## Using the workflow in your ARC +1. Open the [example ARC](#example-data) 1. Add a folder "heatmap" to `workflows` -1. Add the `workflow.cwl` to `workflows/heatmap` -1. Add the `heatmap.py` to `workflows/heatmap` + - Import `workflow.cwl` into `workflows/heatmap` + - Import `heatmap.py` into `workflows/heatmap` 2. Add a folder "heatmap-run" to `runs` -2. Add the `job.yml` to `runs/heatmap-run` + - Import `job.yml` into `runs/heatmap-run` +The ARC should now look like this: + - assays - SugarMeasurement @@ -151,19 +169,23 @@ FigureFileName: heatmap - **workflow.cwl** -## Execute the run + - - -```mermaid -flowchart TD +3. In the ARC, navigate to the `heatmap-run` folder: -heatmap.py --o CWL + ```bash + cd runs/heatmap-run + ``` -sugar_result.csv ===CWL@{ shape: doc, label: "workflow.cwl" }==> heatmap.svg +4. Use the `cwltool` to run the workflow: -job.yml --o CWL -``` + ```bash + cwltool ../../workflows/heatmap job.yml + ``` + + :::note[CWL] + This assumes that [cwltool](/nfdi4plants.knowledgebase/cwl/cwl-runner-installation) is installed on your system. + ::: - \ No newline at end of file +