-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace ARCtrl.CWL | ||
|
||
open DynamicObj | ||
open CWLTypes | ||
open Requirements | ||
open Inputs | ||
open Outputs | ||
|
||
module CWL = | ||
|
||
type CWL ( | ||
cwlVersion: string, | ||
cls: Class, | ||
outputs: Output [], | ||
?baseCommand: string [], | ||
?requirements: Requirement [], | ||
?hints: Requirement [], | ||
?inputs: Input [] | ||
) = | ||
inherit DynamicObj () | ||
|
||
let mutable _cwlVersion: string = cwlVersion | ||
let mutable _class: Class = cls | ||
let mutable _outputs: Output [] = outputs | ||
let mutable _baseCommand: string [] option = baseCommand | ||
let mutable _requirements: Requirement [] option = requirements | ||
let mutable _hints: Requirement [] option = hints | ||
let mutable _inputs: Input [] option = inputs | ||
|
||
member this.CWLVersion | ||
with get() = _cwlVersion | ||
and set(version) = _cwlVersion <- version | ||
|
||
member this.Class | ||
with get() = _class | ||
and set(cls) = _class <- cls | ||
|
||
member this.Outputs | ||
with get() = _outputs | ||
and set(outputs) = _outputs <- outputs | ||
|
||
member this.BaseCommand | ||
with get() = _baseCommand | ||
and set(baseCommand) = _baseCommand <- baseCommand | ||
|
||
member this.Requirements | ||
with get() = _requirements | ||
and set(requirements) = _requirements <- requirements | ||
|
||
member this.Hints | ||
with get() = _hints | ||
and set(hints) = _hints <- hints | ||
|
||
member this.Inputs | ||
with get() = _inputs | ||
and set(inputs) = _inputs <- inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
namespace ARCtrl.CWL | ||
|
||
open DynamicObj | ||
|
||
module CWLTypes = | ||
|
||
type FileInstance () = | ||
inherit DynamicObj () | ||
|
||
type DirectoryInstance () = | ||
inherit DynamicObj () | ||
|
||
type DirentInstance = { | ||
// can be string or expression, but expression is string as well | ||
Entry: string | ||
Entryname: string option | ||
Writable: bool option | ||
} | ||
|
||
type CWLType = | ||
| File of FileInstance | ||
| Directory of DirectoryInstance | ||
| Dirent of DirentInstance | ||
| String | ||
| Int | ||
| Long | ||
| Float | ||
| Double | ||
| Boolean | ||
| Stdout | ||
| Null | ||
| Array of CWLType | ||
|
||
type Class = | ||
| Workflow | ||
| CommandLineTool | ||
| ExpressionTool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace ARCtrl.CWL | ||
|
||
open CWLTypes | ||
|
||
module Inputs = | ||
|
||
type InputBinding = { | ||
Prefix: string option | ||
Position: int option | ||
ItemSeparator: string option | ||
Separate: bool option | ||
} | ||
|
||
type Input = { | ||
Name: string | ||
Type: CWLType | ||
InputBinding: InputBinding option | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace ARCtrl.CWL | ||
|
||
open CWLTypes | ||
|
||
module Outputs = | ||
|
||
type OutputBinding = { | ||
Glob: string option | ||
} | ||
|
||
type Output = { | ||
Name: string | ||
Type: CWLType | ||
OutputBinding: OutputBinding option | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
namespace ARCtrl.CWL | ||
|
||
open DynamicObj | ||
open CWLTypes | ||
|
||
module Requirements = | ||
type DockerRequirement = { | ||
DockerPull: string option | ||
DockerFile: string option | ||
DockerImageId: string option | ||
} | ||
|
||
type InputRecordSchema () = | ||
inherit DynamicObj () | ||
|
||
type InputEnumSchema () = | ||
inherit DynamicObj () | ||
|
||
type InputArraySchema () = | ||
inherit DynamicObj () | ||
|
||
type SchemaDefRequirementType = | ||
| InputRecordSchema of InputRecordSchema | ||
| InputEnumSchema of InputEnumSchema | ||
| InputArraySchema of InputArraySchema | ||
|
||
type SoftwarePackage = { | ||
Package: string | ||
Version: string [] option | ||
Specs: string [] option | ||
} | ||
|
||
type EnvironmentDef = { | ||
EnvName: string | ||
EnvValue: string | ||
} | ||
|
||
type ResourceRequirementInstance () = | ||
inherit DynamicObj () | ||
|
||
type Requirement = | ||
| InlineJavascriptRequirement | ||
| SchemaDefRequirement of SchemaDefRequirementType [] | ||
| DockerRequirement of DockerRequirement | ||
| SoftwareRequirement of SoftwarePackage [] | ||
| InitialWorkDirRequirement of CWLType [] | ||
| EnvVarRequirement of EnvironmentDef | ||
| ShellCommandRequirement | ||
| ResourceRequirement of ResourceRequirementInstance | ||
| NetworkAccessRequirement | ||
|