Skip to content
Snippets Groups Projects
Commit 593cf34a authored by Jonathan Ott's avatar Jonathan Ott
Browse files

add cwl, change script.fsx to accept args

parent 1380a5aa
No related branches found
No related tags found
No related merge requests found
scriptFile:
class: File
path: ../workflows/FSharpArcCapsule/script.fsx
firstArg:
class: File
path: ../assays/measurement1/dataset/table.csv
secondArg: ./result.csv
cwlVersion: v1.2
class: CommandLineTool
hints:
DockerRequirement:
dockerPull: mcr.microsoft.com/dotnet/sdk:6.0
requirements:
EnvVarRequirement:
envDef:
- envName: DOTNET_NOLOGO
envValue: "true"
NetworkAccess:
networkAccess: true
baseCommand: [dotnet, fsi]
inputs:
scriptFile:
type: File
inputBinding:
position: 1
firstArg:
type: File
inputBinding:
position: 2
secondArg:
type: string
inputBinding:
position: 3
outputs:
output:
type: File
outputBinding:
glob: "*.csv"
\ No newline at end of file
...@@ -3,9 +3,13 @@ ...@@ -3,9 +3,13 @@
open FSharp.Data open FSharp.Data
let args : string array = fsi.CommandLineArgs |> Array.tail
let first = args.[0]
let second = args.[1]
let data = let data =
CsvFile CsvFile
.Load("/arc/assays/measurement1/dataset/table.csv") .Load(first)
.Cache() .Cache()
let r = let r =
...@@ -15,4 +19,4 @@ let r = ...@@ -15,4 +19,4 @@ let r =
yield sprintf "%f" ((row.["value_1"].AsFloat()) + (row.["value_2"].AsFloat())) yield sprintf "%f" ((row.["value_1"].AsFloat()) + (row.["value_2"].AsFloat()))
] ]
System.IO.File.WriteAllLines("/arc/runs/fsResult1/result.csv",r) System.IO.File.WriteAllLines(second,r)
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment