cwlVersion: v1.2 $namespaces: s: https://schema.org/ edam: http://edamontology.org/ $graph: - class: Workflow id: catch_prediction_pipeline inputs: endpoint: type: string? doc: S3 storage endpoint label: s3storage region: type: string? doc: S3 storage region label: s3storage access_key: type: string? doc: S3 storage access_key label: s3storage secret_key: type: string? doc: S3 storage secret_key label: s3storage session_token: type: string? doc: S3 storage region label: s3storage bucket: type: string? doc: S3 storage bucket label: s3storage base_path: type: string? doc: S3 storage final directory name default: "catch_pred" label: s3storage steps: step_catch_prediction: run: '#catch_prediction_ilvo' in: [] out: - results step_directory_tree: run: '#tree' in: dir: step_catch_prediction/results out: - file_tree step_2s3: run: '#2s3' in: region: region endpoint: endpoint access_key: access_key secret_key: secret_key session_token: session_token bucket: bucket directory: step_catch_prediction/results base_path: base_path out: - base_path step_simulate_metadata: run: '#simulate_metadata_2stac' in: [] out: - metadata step_2stac2: run: '#2stac2_sleeper_pipeline' in: result: step_directory_tree/file_tree metadata: step_simulate_metadata/metadata out: - stac_result outputs: - id: wf_outputs outputSource: - step_2stac2/stac_result type: Directory requirements: InlineJavascriptRequirement: {} s:name: sleeper_pipeline s:description: | This pipeline sleeps for a given number of seconds and then simulates metadata for 2stac. s:keywords: - sleeper s:softwareVersion: 0.2.2 s:producer: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:sourceOrganization: - class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: - class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: https://pipe-drive.inesctec.pt/application-packages/workflows/sleeper/sleeper_REF_0_2_0.cwl s:dateCreated: "2025-06-10T23:24:29Z" - class: ExpressionTool id: simulate_metadata_2stac inputs: [] outputs: metadata: type: File expression: | ${ return { metadata: { "class": "File", "basename": "metadata.json", "nameroot": "metadata", "nameext": ".json", "format": "http://edamontology.org/format_3464", // JSON "contents": JSON.stringify( [{ "filename": "res.json", "description": "This is an example metadata file for 2stac2.", "keywords": ["example", "metadata", "sleeper"], "bbox": [-180, -90, 180, 90], "datetime": new Date().toISOString(), "media_type": "application/json", "geometry": { "type": "Polygon", "coordinates": [ [ [-180, -90], [-180, 90], [180, 90], [180, -90], [-180, -90] ] ] }, }] ) } } } - class: CommandLineTool id: catch_prediction_ilvo baseCommand: Rscript arguments: - /Scripts/11_Model_Predictions.R inputs: [] outputs: results: type: Directory outputBinding: glob: /Models/Predictions doc: The resulting files of the model requirements: NetworkAccess: networkAccess: true ResourceRequirement: {} InlineJavascriptRequirement: {} EnvVarRequirement: envDef: PATH: /.pyenv/versions/base/bin:/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DockerRequirement: dockerPull: csblanco/demo_iliad_ilvo_sole_plaice_predict s:name: catch_prediction_ilvo s:description: This image downloads and processes forecast data from Marine Copernicus, integrating it with bathymetry and substrate data from EMODnet. The resulting environmental dataset serves as input for machine learning models that predict suitable areas for catching common sole (Solea solea) and European plaice (Pleuronectes platessa). These models were trained using survey data from ICES. This image is for demonstration purposes only, and its predictions should not be used for further analysis or decision-making. s:keywords: - prediction s:programmingLanguage: R s:softwareVersion: 0.1.0 s:producer: class: s:Organization s:name: ILVO s:url: https://ilvo.vlaanderen.be/en/ s:address: class: s:PostalAddress s:addressCountry: BE s:sourceOrganization: - class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT - class: s:Organization s:name: ILVO s:url: https://ilvo.vlaanderen.be/en/ s:address: class: s:PostalAddress s:addressCountry: BE s:author: - class: s:Person s:name: Clyde s:email: clyde@example.com s:codeRepository: https://pipe-drive.inesctec.pt/application-packages/tools/dir-tree/dir_tree_0_1_0.cwl s:dateCreated: "2025-05-12T14:37:04Z" - class: CommandLineTool id: tree baseCommand: python arguments: - /opt/tree.py - --dir - valueFrom: $( inputs.dir ) inputs: dir: type: Directory doc: directory outputs: file_tree: type: File outputBinding: glob: "result/file_tree.txt" doc: tree list format: edam:format_3464 # JSON requirements: NetworkAccess: networkAccess: true ResourceRequirement: {} InlineJavascriptRequirement: {} EnvVarRequirement: envDef: PATH: /opt/conda/envs/application/bin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DockerRequirement: dockerPull: iliad-repository.inesctec.pt/dir-tree:0.1.0 s:name: tree s:description: Print the tree of a given directory s:keywords: - tree - print - directory s:programmingLanguage: python s:softwareVersion: 0.1.0 s:producer: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:sourceOrganization: - class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: - class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: https://pipe-drive.inesctec.pt/application-packages/tools/dir-tree/dir_tree_0_1_0.cwl s:dateCreated: "2025-05-12T14:37:04Z" - class: CommandLineTool id: 2stac2_sleeper_pipeline baseCommand: python arguments: - /opt/2stac2.py - --file - valueFrom: $(inputs.result) - --metadata - valueFrom: $(inputs.metadata) inputs: result: format: edam:format_3464 # JSON doc: result type: File metadata: format: edam:format_3464 # JSON doc: metadata file description type: File outputs: stac_result: outputBinding: glob: stac_result type: Directory doc: STAC output requirements: EnvVarRequirement: envDef: PATH: /opt/conda/envs/application/bin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/2stac2:0.3.1 InplaceUpdateRequirement: inplaceUpdate: true s:name: 2stac2_sleeper_pipeline s:softwareVersion: 0.3.1 s:description: 2stac2 for the sleeper pipeline s:keywords: - stac - metadata s:programmingLanguage: python s:sourceOrganization: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: https://pipe-drive.inesctec.pt/application-packages/tools/2stac2/2stac2_sleeper_pipeline_0_3_1.cwl s:dateCreated: "2025-06-10T15:27:44Z" - class: CommandLineTool id: 2s3 baseCommand: python arguments: - /opt/2s3.py - --endpoint - valueFrom: $( inputs.endpoint ) - --access_key - valueFrom: $( inputs.access_key ) - --secret_key - valueFrom: $( inputs.secret_key ) - --bucket - valueFrom: $( inputs.bucket ) - --endpoint - valueFrom: $( inputs.endpoint ) - valueFrom: $( function () { if (inputs.region) { return ["--region", inputs.region]; } else { return []; } }()) - valueFrom: $( function () { if (inputs.base_path) { return ["--base_path", `${inputs.base_path}_${new Date().toISOString().replace(/:/g, '').replace(/\-/g, '').split('.')[0]}`]; } else { return []; } }()) - valueFrom: $( function () { if (inputs.session_token) { return ["--session_token", inputs.session_token]; } else { return []; } }()) - valueFrom: $( function () { if(inputs.files) { var files_array = []; Object.keys(inputs.files).forEach(function (element) { files_array.push('--file'); files_array.push(inputs.files[element]); }); return files_array; } else { return []; } }()) - valueFrom: $( function () { if(inputs.directories) { var directories_array = []; Object.keys(inputs.directories).forEach(function (element) { directories_array.push('--directory'); directories_array.push(inputs.directories[element]); }); return directories_array; } else { return []; } }()) - valueFrom: $( function () { if(inputs.file) { return ['--file', inputs.file]; } else { return []; } }()) - valueFrom: $( function () { if(inputs.directory) { return ['--directory', inputs.directory]; } else { return []; } }()) inputs: endpoint: type: string? doc: S3 storage endpoint region: type: string? doc: S3 storage region access_key: type: string? doc: S3 storage access_key secret_key: type: string? doc: S3 storage secret_key session_token: type: string? doc: S3 storage region bucket: type: string? doc: S3 storage bucket base_path: type: string? doc: S3 storage final directory name files: type: File[]? doc: Multiple files to upload directories: type: Directory[]? doc: Multiple directories to upload directory: type: Directory? doc: Single directory to upload file: type: File? doc: Single file to upload outputs: base_path: type: string requirements: NetworkAccess: networkAccess: true ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/2s3:0.1.0 hints: "cwltool:Secrets": secrets: [access_key,secret_key,session_token] s:name: 2s3 s:description: Uploads files and/or folders to a S3 bucket storage. s:keywords: - s3 - storage s:programmingLanguage: python s:softwareVersion: 0.1.0 s:producer: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:sourceOrganization: - class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: - class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: https://pipe-drive.inesctec.pt/application-packages/tools/2s3/2s3_0_1_0.cwl s:dateCreated: "2025-05-12T11:03:57Z"