Skip to content

SciWIn-Client

SciWI-Client helps scientists build, run, and publish complex computational workflows — making research more reproducible, scalable, and collaborative.
$ s4n --help
$ s4n tool create python calculation.py --population population.csv --speakers speakers.csv
$ s4n run python plot.py --results results.csv
$ s4n workflow create main
$ s4n workflow connect main --from @inputs/speakers --to calculation/speakers
$ s4n execute local workflows/main/main.cwl inputs.yml
Terminal Window
$ s4n --help
_____ _ _ _ _____ _____ _ _ _
/ ___| (_)| | | ||_ _| / __ \| |(_) | |
\ `--. ___ _ | | | | | | _ __ | / \/| | _ ___ _ __ | |_
`--. \ / __|| || |/\| | | | | '_ \ | | | || | / _ \| '_ \ | __|
/\__/ /| (__ | |\ /\ / _| |_| | | | | \__/\| || || __/| | | || |_
\____/ \___||_| \/ \/ \___/|_| |_| \____/|_||_| \___||_| |_| \__|
Client tool for Scientific Workflow Infrastructure (SciWIn)
Documentation: https://fairagro.github.io/m4.4_sciwin_client/
Version: 0.6.1
Usage: s4n <COMMAND>
Commands:
init Initializes project folder structure and repository
tool Provides commands to create and work with CWL CommandLineTools
workflow Provides commands to create and work with CWL Workflows
annotate Annotate CWL files
execute Execution of CWL Files locally or on remote servers [aliases: ex]
sync
completions Generate shell completions
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
$ s4n tool create python calculation.py --population population.csv --speakers speakers.csv
📂 The current working directory is /home/ubuntu/sciwin_test
▶️ Executing command: python calculation.py --population population.csv --speakers speakers.csv
Total population: 7694245029
language speakers percentage
0 Bangla 300000000 3.899018
1 Egyptian Arabic 100542400 1.306722
2 English 1132366680 14.717060
3 German 134993040 1.754468
4 Indonesian 198996550 2.586304
5 Japanese 128000000 1.663581
6 Portuguese 475300000 6.177344
7 Punjabi 125000000 1.624591
8 Russian 154000000 2.001496
9 Standard Mandarin 1090951810 14.178803
📜 Found changes:
- results.csv
📄 Created CWL file workflows/calculation/calculation.cwl
$ s4n run python plot.py --results results.csv
📂 The current working directory is /home/ubuntu/sciwin_test
▶️ Executing command: python plot.py --results results.csv
📜 Found changes:
- results.svg
📄 Created CWL file workflows/plot/plot.cwl
$ s4n workflow create main
📄 Created new Workflow file: workflows/main/main.cwl
1 | + #!/usr/bin/env cwl-runner
2 | +
3 | + cwlVersion: v1.2
4 | + class: Workflow
5 | +
6 | + inputs: []
7 | + outputs: []
8 | + steps: []
$ s4n workflow connect main --from @inputs/speakers --to calculation/speakers
➕ Added step calculation to workflow
➕ Added or updated connection from inputs.speakers to calculation/speakers in workflow
✔️ Updated Workflow workflows/main/main.cwl!
3 3 | cwlVersion: v1.2
4 4 | class: Workflow
5 5 |
6 | - inputs: []
6 | + inputs:
7 | + - id: speakers
8 | + type: File
9 | +
7 10 | outputs: []
8 | - steps: []
11 | + steps:
12 | + - id: calculation
13 | + in:
14 | + - id: speakers
15 | + source: speakers
16 | + run: ../calculation/calculation.cwl
17 | + out:
18 | + - results
$ s4n execute local workflows/main/main.cwl inputs.yml
🚲 Executing Tool "workflows/main/../calculation/calculation.cwl" ...
📁 Created staging directory: "/tmp/.tmpAz2l9s"
⏳ Executing Command: `python workflows/calculation/calculation.py --population /tmp/.tmpAz2l9s/data/population.csv --speakers /tmp/.tmpAz2l9s/data/speakers_revised.csv`
Total population: 7694245029
language speakers percentage
0 Bangla 300000000 3.899018
1 Egyptian Arabic 100542400 1.306722
2 English 1132366680 14.717060
3 German 134993040 1.754468
4 Indonesian 198996550 2.586304
5 Japanese 128000000 1.663581
6 Portuguese 475300000 6.177344
7 Punjabi 125000000 1.624591
8 Russian 154000000 2.001496
9 Standard Mandarin 1090951810 14.178803
📜 Wrote output file: "/tmp/.tmpmzpkus/results.csv"
✔️ Tool "workflows/main/../calculation/calculation.cwl" executed successfully in 623ms!
🚲 Executing Tool "workflows/main/../plot/plot.cwl" ...
📁 Created staging directory: "/tmp/.tmprbR7MR"
⏳ Executing Command: `python workflows/plot/plot.py --results /tmp/.tmprbR7MR/.tmpmzpkus/results.csv`
📜 Wrote output file: "/tmp/.tmpmzpkus/results.svg"
✔️ Tool "workflows/main/../plot/plot.cwl" executed successfully in 2s!
✔️ Workflow "workflows/main/main.cwl" executed successfully in 2s!
{
"out": {
"class": "File",
"location": "file:///mnt/hello_world/results.svg",
"path": "/mnt/hello_world/results.svg",
"basename": "results.svg",
"nameroot": "results",
"nameext": ".svg",
"checksum": "sha1$8e59fcb5729b9576c7f721ef9f63057b09e738f8",
"size": 75260
}
}
  1. The easiest way to install s4n is to use the installer scripts.

    Linux

    Terminal window
    curl --proto '=https' --tlsv1.2 -LsSf https://fairagro.github.io/m4.4_sciwin_client/get_s4n.sh | sh

    Windows

    Terminal window
    powershell -ExecutionPolicy Bypass -c "irm https://fairagro.github.io/m4.4_sciwin_client/get_s4n.ps1 | iex"
  2. Initialize a SciWIn Project in your code repository
    Terminal window
    s4n init
  3. Using the s4n tool and s4n workflow commands you can built your reusable data pipelines stepwise.
    Terminal window
    s4n tool create echo "Hello World"