diff --git a/runs/FSharpArcCapsule.yml b/runs/FSharpArcCapsule.yml index 6ecc43b77793c3fdd10abaf2a1f39e3a683a962d..2ed74490eafd4461d79886a1854ee217c1994db5 100644 --- a/runs/FSharpArcCapsule.yml +++ b/runs/FSharpArcCapsule.yml @@ -1,3 +1,22 @@ arcDirectory: class: Directory path: ../ +firstArg: + class: File + path: ../assays/measurement1/dataset/table.csv +secondArg: ./result.csv + +arc:has process sequence: + - class: arc:process sequence + arc:has input: + - class: arc:data + arc:name: "./arc/assays/measurement1/dataset/table.csv" + arc:has output: + - class: arc:data + arc:name: "./arc/runs/fsResult1/result.csv" + +$namespaces: + arc: https://github.com/nfdi4plants/ARC_ontology + +$schemas: + - https://raw.githubusercontent.com/nfdi4plants/ARC_ontology/main/ARC_v2.0.owl diff --git a/runs/result.csv b/runs/result.csv deleted file mode 100644 index 55137a39f41b555f9b7d26505f9c15240eec09ee..0000000000000000000000000000000000000000 --- a/runs/result.csv +++ /dev/null @@ -1,651 +0,0 @@ -Sum_1-2 -52.374927 -30.708113 -43.347295 -32.330910 -68.832634 -50.943254 -82.709457 -45.815823 -49.329293 -15.044567 -42.581675 -61.490285 -61.483285 -33.515325 -39.027573 -57.814962 -41.484288 -62.969456 -56.084297 -76.014723 -39.715133 -73.319637 -67.026630 -56.888570 -48.411011 -70.181930 -18.055983 -35.218257 -26.840155 -72.385753 -43.972671 -44.078586 -53.938409 -43.395488 -28.723837 -54.061480 -58.528494 -52.236839 -56.893014 -56.525366 -58.955729 -46.444395 -39.269410 -44.423325 -19.510763 -48.672524 -64.933334 -60.750569 -45.516685 -46.623334 -76.270554 -29.934011 -50.275506 -40.572500 -55.508817 -43.844585 -57.298854 -38.721723 -49.707433 -48.383707 -73.873611 -56.579798 -49.573657 -74.940937 -48.889656 -11.609634 -39.675693 -29.804500 -43.964936 -35.057027 -37.625311 -77.481503 -41.714170 -52.904955 -35.366910 -39.166247 -53.024085 -7.132227 -54.059714 -38.487312 -79.778612 -49.592970 -42.861946 -63.583801 -81.084601 -29.562834 -54.967924 -56.813437 -50.634788 -45.835761 -53.669806 -27.804082 -62.293055 -42.933661 -34.954878 -64.885836 -57.539051 -33.539328 -69.979137 -28.013399 -35.567483 -36.313160 -25.754159 -62.622885 -52.078601 -82.992087 -63.108076 -48.537387 -72.088146 -47.708756 -50.081352 -46.179143 -74.732584 -53.696995 -50.129993 -17.040583 -80.887178 -40.020833 -49.022050 -49.116439 -38.468226 -29.134830 -20.322282 -49.185777 -53.308382 -45.099085 -65.808325 -59.549146 -50.048213 -26.082749 -80.124302 -55.766722 -69.180818 -60.836923 -52.463229 -51.026135 -31.315524 -51.322238 -33.929750 -36.525866 -32.361278 -44.855573 -59.421811 -23.286046 -57.853846 -18.032623 -49.000570 -47.200617 -58.111273 -48.959961 -25.847692 -29.714310 -53.137056 -65.416045 -56.470946 -55.253781 -32.155232 -71.859925 -44.441666 -16.885794 -50.748223 -41.405682 -55.029351 -76.376410 -61.518971 -51.721628 -46.721816 -28.638947 -46.882807 -68.343571 -53.176561 -64.122778 -62.437319 -61.480298 -53.428447 -37.651474 -43.799034 -45.150540 -29.359705 -77.462318 -34.320945 -50.826392 -18.672423 -54.533843 -49.263052 -15.014251 -59.637263 -75.641556 -32.974664 -60.915148 -35.974519 -77.802002 -59.076702 -34.350295 -42.615288 -69.605218 -31.627390 -74.992208 -58.201044 -30.875197 -46.547036 -49.237101 -42.282544 -69.203356 -23.576466 -29.353965 -51.963650 -56.777796 -57.466679 -40.537154 -53.733623 -34.704655 -62.195681 -49.928415 -50.440171 -72.540199 -41.797528 -32.751826 -50.317731 -50.603325 -29.653995 -44.363277 -46.002078 -49.866360 -55.064603 -38.464424 -71.973447 -33.156272 -29.284836 -42.182426 -56.201244 -62.848672 -69.450503 -42.519988 -58.538124 -67.876770 -42.284114 -48.723362 -71.239238 -41.335381 -67.998167 -44.738949 -39.372789 -44.085337 -62.610914 -40.226752 -44.328863 -29.687844 -52.963598 -46.399305 -51.796664 -50.799966 -34.601864 -73.164871 -38.834143 -50.748055 -58.444272 -23.501147 -61.605060 -24.335268 -44.964741 -42.034866 -28.217985 -66.388532 -31.751391 -33.250285 -78.192329 -61.761701 -54.933711 -46.687613 -13.441307 -58.399611 -48.789001 -54.413686 -47.798646 -60.974053 -46.095188 -77.736080 -45.382836 -63.210533 -82.218378 -29.634936 -44.717552 -57.165995 -54.695814 -46.757029 -30.994554 -55.775549 -34.215764 -81.310734 -59.001417 -46.079728 -42.117032 -48.162080 -57.650783 -44.735961 -59.745161 -55.039142 -52.170244 -30.148709 -36.066474 -54.716652 -24.967065 -50.843673 -62.297811 -49.496099 -23.585305 -51.888732 -46.313279 -55.850779 -22.393465 -56.058621 -52.717924 -77.662074 -34.000533 -14.115106 -75.600210 -36.806491 -52.840479 -25.554121 -18.299383 -39.884859 -74.274848 -57.681610 -48.870748 -56.811627 -40.323529 -64.027898 -54.749657 -66.107093 -72.303001 -60.942526 -54.115156 -64.309181 -42.753524 -61.962672 -56.998966 -66.032093 -74.258508 -39.864467 -45.187562 -47.024809 -78.548947 -51.666372 -80.538611 -59.184048 -49.583706 -37.009837 -47.267822 -48.440376 -68.307612 -51.023075 -63.993605 -60.544180 -45.329090 -44.611970 -56.434869 -67.624087 -59.176585 -68.513906 -68.830402 -20.619566 -45.285990 -50.768093 -42.615570 -57.791240 -63.300958 -56.322222 -39.478805 -49.189127 -42.920404 -39.023948 -45.417217 -22.296066 -47.066346 -55.762485 -60.253314 -37.568683 -67.782594 -55.737468 -71.387626 -46.630654 -56.758652 -62.682231 -45.097253 -78.585691 -55.627721 -62.010825 -49.536678 -4.913428 -60.516656 -60.876080 -32.450371 -39.049506 -37.752071 -57.404212 -53.598622 -49.306831 -41.504588 -48.036989 -56.673481 -44.928617 -56.359062 -60.992957 -59.033875 -51.883007 -30.652988 -48.403692 -93.075022 -37.637492 -36.185365 -46.091212 -46.387284 -59.591843 -53.479518 -55.205289 -39.053466 -40.187032 -56.556575 -21.922778 -40.453022 -54.711698 -34.355186 -48.573944 -52.363719 -46.941065 -39.294103 -33.816825 -44.250689 -44.074156 -48.947397 -61.858121 -46.581662 -34.903942 -49.315023 -65.599510 -39.496400 -47.746650 -25.082062 -39.310162 -49.861966 -60.633814 -71.293685 -58.461712 -43.419262 -58.911596 -31.065021 -62.432397 -61.965042 -57.238112 -48.540426 -41.931047 -49.954690 -33.390882 -62.522379 -57.253377 -74.839880 -66.559072 -30.993192 -70.112733 -43.431678 -74.371371 -67.418406 -51.656030 -41.598203 -48.328989 -28.741102 -33.778325 -67.070264 -48.586437 -42.871144 -70.542905 -31.149471 -32.989862 -49.935477 -58.544938 -67.995866 -41.084719 -62.600805 -63.003809 -43.959093 -95.039498 -51.635094 -42.594618 -56.738454 -56.472886 -72.454830 -54.390798 -65.135740 -70.138773 -45.275571 -54.464354 -28.263000 -63.981719 -41.848561 -55.615102 -35.448199 -86.911426 -44.242514 -32.677179 -40.452974 -34.386452 -52.977132 -64.966342 -39.537276 -57.530906 -54.345038 -55.536818 -55.999242 -45.167076 -40.372522 -22.215040 -45.366335 -49.567678 -48.779479 -30.159274 -56.561762 -68.434903 -36.236297 -35.488041 -77.472220 -38.989784 -39.402822 -68.317668 -75.229367 -53.419890 -60.173582 -26.209845 -48.357315 -29.727833 -38.147947 -67.890142 -22.794397 -31.554084 -58.424533 -46.306834 -59.655932 -55.330720 -54.258171 -31.582894 -41.312617 -73.765279 -53.500950 -74.922643 -46.323867 -53.648006 -37.480867 -61.356103 -27.769268 -39.382548 -44.185602 -66.040173 -56.410287 -37.092155 -68.530676 -51.842190 -41.236812 -40.983752 -27.691441 -31.891113 -59.483029 -66.877746 -74.394752 -43.754073 -61.243756 -60.027122 -39.725852 -45.948957 -57.284519 -45.996091 -67.530106 -47.148547 -32.494688 -29.333068 -54.995925 -34.525909 -63.324913 -54.005796 -36.665937 -55.685400 -55.079378 -51.315077 -24.376215 -61.887355 -47.105497 -46.901127 -31.950832 -51.792501 -57.443122 -43.485227 -30.458080 -66.059519 -29.969853 -67.121573 -41.071706 -66.490999 -47.524504 -35.631804 -80.569670 -69.667320 -31.954822 -36.904120 -50.375188 -19.774263 -55.692532 -68.069211 -43.978549 -46.565912 -33.415154 -54.959587 -41.498255 -45.510471 -53.768895 -47.423433 -36.227767 -60.372391 -56.602051 -11.669908 -59.133000 -54.510422 -44.251599 -38.670563 -57.824793 -48.460889 -53.916399 -60.547234 -57.513630 -32.481570 -44.472237 -47.860284 -60.360647 -61.895478 -44.809410 -46.069994 -50.202907 -46.490782 -77.183441 -45.670381 -69.002411 -29.191174 -52.991669 -25.541652 -12.082276 -44.325765 -49.446058 -51.843428 -71.070566 -81.170712 -42.853130 -48.259251 diff --git a/workflows/ARCMount/FSharpArcCapsule.cwl b/workflows/ARCMount/FSharpArcCapsule.cwl new file mode 100644 index 0000000000000000000000000000000000000000..7cc7265b136c092317f4d96da299231caca83102 --- /dev/null +++ b/workflows/ARCMount/FSharpArcCapsule.cwl @@ -0,0 +1,74 @@ +cwlVersion: v1.2 +class: CommandLineTool +hints: + DockerRequirement: + dockerPull: mcr.microsoft.com/dotnet/sdk:6.0 +requirements: + - class: InitialWorkDirRequirement + listing: + - entryname: arc + entry: $(inputs.arcDirectory) + writable: true + - class: EnvVarRequirement + envDef: + - envName: DOTNET_NOLOGO + envValue: "true" + - class: NetworkAccess + networkAccess: true +baseCommand: [dotnet, fsi, "./arc/workflows/ARCMount/script.fsx"] +inputs: + arcDirectory: + type: Directory +outputs: + output: + type: File + outputBinding: + glob: "./arc/runs/fsResult1/result.csv" + +arc:has technology type: + - class: arc:technology type + arc:annotation value: "Docker Container" + +arc:technology platform: ".NET" + +arc:performer: + - class: arc:Person + arc:first name: "Timo" + arc:last name: "Mühlhaus" + arc:email: "muehlhaus@bio.uni-kl.de " + arc:affiliation: "RPTU Kaiserslautern/Landau" + arc:has role: + - class: arc:role + arc:term accession: "https://credit.niso.org/contributor-roles/formal-analysis/" + arc:annotation value: "Formal analysis" + +arc:has process sequence: + - class: arc:process sequence + arc:name: "script.fsx" + arc:has input: + - class: arc:data + arc:name: "./arc/assays/measurement1/dataset/table.csv" + arc:has output: + - class: arc:data + arc:name: "./arc/runs/fsResult1/result.csv" + arc:has parameter value: + - class: arc:process parameter value + arc:has parameter: + - class: arc:protocol parameter + arc:has parameter name: + - class: arc:parameter name + arc:term accession: "http://purl.obolibrary.org/obo/NCIT_C43582" + arc:term source REF: "NCIT" + arc:annotation value: "Data Transformation" + arc:value: + - class: arc:ontology annotation + arc:term accession: "http://purl.obolibrary.org/obo/NCIT_C64911" + arc:term source REF: "NCIT" + arc:annotation value: "Addition" + + +$namespaces: + arc: https://github.com/nfdi4plants/ARC_ontology + +$schemas: + - https://raw.githubusercontent.com/nfdi4plants/ARC_ontology/main/ARC_v2.0.owl \ No newline at end of file diff --git a/workflows/FSharpArcCapsule/script.fsx b/workflows/ARCMount/script.fsx similarity index 100% rename from workflows/FSharpArcCapsule/script.fsx rename to workflows/ARCMount/script.fsx diff --git a/workflows/.gitkeep b/workflows/Devcontainer/.gitkeep similarity index 100% rename from workflows/.gitkeep rename to workflows/Devcontainer/.gitkeep diff --git a/workflows/Devcontainer/FSharpArcCapsule.cwl b/workflows/Devcontainer/FSharpArcCapsule.cwl new file mode 100644 index 0000000000000000000000000000000000000000..d3f80bc08d2146b1143b14c542f1b8f95ea029b3 --- /dev/null +++ b/workflows/Devcontainer/FSharpArcCapsule.cwl @@ -0,0 +1,75 @@ +cwlVersion: v1.2 +class: CommandLineTool +hints: + DockerRequirement: + dockerImageId: "devcontainer" + dockerFile: {$include: "FSharpArcCapsule/Dockerfile"} +requirements: + - class: InitialWorkDirRequirement + listing: + - entryname: arc + entry: $(inputs.arcDirectory) + writable: true + - class: EnvVarRequirement + envDef: + - envName: DOTNET_NOLOGO + envValue: "true" + - class: NetworkAccess + networkAccess: true +baseCommand: [dotnet, fsi, "./arc/workflows/Devcontainer/FSharpArcCapsule/script.fsx"] +inputs: + arcDirectory: + type: Directory +outputs: + output: + type: File + outputBinding: + glob: "./arc/runs/fsResult1/result.csv" + +arc:has technology type: + - class: arc:technology type + arc:annotation value: "Fsharp Devcontainer" + +arc:technology platform: ".NET" + +arc:performer: + - class: arc:Person + arc:first name: "Timo" + arc:last name: "Mühlhaus" + arc:email: "muehlhaus@bio.uni-kl.de " + arc:affiliation: "RPTU Kaiserslautern/Landau" + arc:has role: + - class: arc:role + arc:term accession: "https://credit.niso.org/contributor-roles/formal-analysis/" + arc:annotation value: "Formal analysis" + +arc:has process sequence: + - class: arc:process sequence + arc:name: "script.fsx" + arc:has input: + - class: arc:data + arc:name: "./arc/assays/measurement1/dataset/table.csv" + arc:has output: + - class: arc:data + arc:name: "./arc/runs/fsResult1/result.csv" + arc:has parameter value: + - class: arc:process parameter value + arc:has parameter: + - class: arc:protocol parameter + arc:has parameter name: + - class: arc:parameter name + arc:term accession: "http://purl.obolibrary.org/obo/NCIT_C43582" + arc:term source REF: "NCIT" + arc:annotation value: "Data Transformation" + arc:value: + - class: arc:ontology annotation + arc:term accession: "http://purl.obolibrary.org/obo/NCIT_C64911" + arc:term source REF: "NCIT" + arc:annotation value: "Addition" + + +$namespaces: + arc: https://github.com/nfdi4plants/ARC_ontology + +$schemas: + - https://raw.githubusercontent.com/nfdi4plants/ARC_ontology/main/ARC_v2.0.owl \ No newline at end of file diff --git a/workflows/FSharpArcCapsule/.config/dotnet-tools.json b/workflows/Devcontainer/FSharpArcCapsule/.config/dotnet-tools.json similarity index 100% rename from workflows/FSharpArcCapsule/.config/dotnet-tools.json rename to workflows/Devcontainer/FSharpArcCapsule/.config/dotnet-tools.json diff --git a/workflows/FSharpArcCapsule/.devcontainer/devcontainer.json b/workflows/Devcontainer/FSharpArcCapsule/.devcontainer/devcontainer.json similarity index 100% rename from workflows/FSharpArcCapsule/.devcontainer/devcontainer.json rename to workflows/Devcontainer/FSharpArcCapsule/.devcontainer/devcontainer.json diff --git a/workflows/FSharpArcCapsule/.devcontainer/settings.vscode.json b/workflows/Devcontainer/FSharpArcCapsule/.devcontainer/settings.vscode.json similarity index 100% rename from workflows/FSharpArcCapsule/.devcontainer/settings.vscode.json rename to workflows/Devcontainer/FSharpArcCapsule/.devcontainer/settings.vscode.json diff --git a/workflows/FSharpArcCapsule/Dockerfile b/workflows/Devcontainer/FSharpArcCapsule/Dockerfile similarity index 100% rename from workflows/FSharpArcCapsule/Dockerfile rename to workflows/Devcontainer/FSharpArcCapsule/Dockerfile diff --git a/workflows/Devcontainer/FSharpArcCapsule/script.fsx b/workflows/Devcontainer/FSharpArcCapsule/script.fsx new file mode 100644 index 0000000000000000000000000000000000000000..155693f823fcdcccff9a5ac13dca26566792945d --- /dev/null +++ b/workflows/Devcontainer/FSharpArcCapsule/script.fsx @@ -0,0 +1,20 @@ +#r "nuget: FSharp.Data, 5.0.2" + +open FSharp.Data +open System.IO + +printfn "%A" (System.IO.Directory.GetCurrentDirectory()) + +let data = + CsvFile + .Load(Path.Combine(System.IO.Directory.GetCurrentDirectory(),"./arc/assays/measurement1/dataset/table.csv")) + .Cache() + +let r = + [ + yield "Sum_1-2" + for row in data.Rows do + yield sprintf "%f" ((row.["value_1"].AsFloat()) + (row.["value_2"].AsFloat())) + ] + +System.IO.File.WriteAllLines("./arc/runs/fsResult1/result.csv",r) \ No newline at end of file diff --git a/workflows/FSharpArcCapsule.cwl b/workflows/FSharpArcCapsule.cwl deleted file mode 100644 index f3aa1c3f95a5738b6ef96e0dfa546651bc739c0c..0000000000000000000000000000000000000000 --- a/workflows/FSharpArcCapsule.cwl +++ /dev/null @@ -1,29 +0,0 @@ -cwlVersion: v1.2 -class: CommandLineTool -hints: - DockerRequirement: - dockerImageId: "devcontainer" - dockerFile: {$include: "FSharpArcCapsule/Dockerfile"} -requirements: - - class: InitialWorkDirRequirement - listing: - - entryname: arc - entry: $(inputs.arcDirectory) - writable: true - - class: EnvVarRequirement - envDef: - - envName: DOTNET_NOLOGO - envValue: "true" - - envName: CWL - envValue: "true" - - class: NetworkAccess - networkAccess: true -baseCommand: [dotnet, fsi, "./arc/workflows/FSharpArcCapsule/script.fsx"] -inputs: - arcDirectory: - type: Directory -outputs: - output: - type: File - outputBinding: - glob: "./arc/runs/fsResult1/result.csv" \ No newline at end of file diff --git a/workflows/FixedScript/FSharpArcCapsule.cwl b/workflows/FixedScript/FSharpArcCapsule.cwl new file mode 100644 index 0000000000000000000000000000000000000000..aa0b5e02141bebb3b299403b52c8a69d919f5095 --- /dev/null +++ b/workflows/FixedScript/FSharpArcCapsule.cwl @@ -0,0 +1,75 @@ +cwlVersion: v1.2 +class: CommandLineTool +hints: + DockerRequirement: + dockerPull: mcr.microsoft.com/dotnet/sdk:6.0 +requirements: + - class: InitialWorkDirRequirement + listing: + - entryname: script.fsx + entry: + $include: script.fsx + - class: EnvVarRequirement + envDef: + - envName: DOTNET_NOLOGO + envValue: "true" + - class: NetworkAccess + networkAccess: true +baseCommand: [dotnet, fsi, script.fsx] +inputs: + firstArg: + type: File + inputBinding: + position: 1 + secondArg: + type: string + inputBinding: + position: 2 + +outputs: + output: + type: File + outputBinding: + glob: "*.csv" + +arc:has technology type: + - class: arc:technology type + arc:annotation value: "Docker Container" + +arc:technology platform: ".NET" + +arc:performer: + - class: arc:Person + arc:first name: "Timo" + arc:last name: "Mühlhaus" + arc:email: "muehlhaus@bio.uni-kl.de " + arc:affiliation: "RPTU Kaiserslautern/Landau" + arc:has role: + - class: arc:role + arc:term accession: "https://credit.niso.org/contributor-roles/formal-analysis/" + arc:annotation value: "Formal analysis" + +arc:has process sequence: + - class: arc:process sequence + arc:name: "script.fsx" + arc:has parameter value: + - class: arc:process parameter value + arc:has parameter: + - class: arc:protocol parameter + arc:has parameter name: + - class: arc:parameter name + arc:term accession: "http://purl.obolibrary.org/obo/NCIT_C43582" + arc:term source REF: "NCIT" + arc:annotation value: "Data Transformation" + arc:value: + - class: arc:ontology annotation + arc:term accession: "http://purl.obolibrary.org/obo/NCIT_C64911" + arc:term source REF: "NCIT" + arc:annotation value: "Addition" + + +$namespaces: + arc: https://github.com/nfdi4plants/ARC_ontology + +$schemas: + - https://raw.githubusercontent.com/nfdi4plants/ARC_ontology/main/ARC_v2.0.owl \ No newline at end of file diff --git a/workflows/FixedScript/script.fsx b/workflows/FixedScript/script.fsx new file mode 100644 index 0000000000000000000000000000000000000000..581145dd3da657009c1e3c087cd95d756a9cc178 --- /dev/null +++ b/workflows/FixedScript/script.fsx @@ -0,0 +1,22 @@ +#r "nuget: FSharp.Data, 5.0.2" + +open FSharp.Data +open System.IO + +let args : string array = fsi.CommandLineArgs |> Array.tail +let first = args.[0] +let second = args.[1] + +let data = + CsvFile + .Load(first) + .Cache() + +let r = + [ + yield "Sum_1-2" + for row in data.Rows do + yield sprintf "%f" ((row.["value_1"].AsFloat()) + (row.["value_2"].AsFloat())) + ] + +System.IO.File.WriteAllLines(second,r) \ No newline at end of file