Skip to content
Snippets Groups Projects
Commit d69730d2 authored by Lorenz Gruber's avatar Lorenz Gruber
Browse files

working on africapolis workflow

parent d8a2cd6c
No related branches found
No related tags found
No related merge requests found
Pipeline #68965 passed
cwlVersion: v1.2
class: Workflow
requirements:
- class: InitialWorkDirRequirement
listing:
- entryname: fishnet
writable: true
entry: ""
- class: ScatterFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
inputs:
vector_input:
type: File
doc: "Input vector file to Africapolis workflow"
config:
type: File
doc: "Configuration file for Africapolis workflow"
partitions:
type: int
default: 4
doc: "Number of partitions created on the input for parallel computation"
outputs:
vector_output:
type: File[]
outputSource: flatten/flatFiles
steps:
split:
run: ../util/split.cwl
in:
shpFile: vector_input
# Pass the relative path "fishnet", which will resolve to the directory created by the InitialWorkDirRequirement.
splits: partitions
out: [outFile]
filter:
run: ../sda/filter.cwl
in:
shpFile:
source: split/outFile
valueFrom: >
$(
// self is an array of Files for one shapefile group.
// Filter to get those with a basename ending with ".shp" and select the first one.
(self.filter(file => file.basename && file.basename.endsWith('.shp')))[0]
)
config: config
scatter: [shpFile]
out: [outFile]
flatten:
run:
class: ExpressionTool
cwlVersion: v1.2
requirements:
- class: InlineJavascriptRequirement
inputs:
files:
type:
type: array
items:
type: array
items: File
outputs:
flatFiles:
type: File[]
expression: "$( [].concat.apply([], inputs.files) )"
in:
files: filter/outFile
out: [flatFiles]
\ No newline at end of file
{
"vector_input":{
"class": "File",
"path": "/home/lolo/Documents/fishnet/data/samples/Corvara_IT.tiff",
},
"config":{
"class":"File",
"path": "/home/lolo/Documents/fishnet/prod/local/sda-workflow-local.json"
}
}
\ No newline at end of file
cwlVersion: v1.2
name: Shapefile
type: record
fields:
- name: shp
type: File
doc: "The main Shapefile (.shp)"
- name: shx
type: File
doc: "The shape index file (.shx)"
- name: dbf
type: File
doc: "The attribute data file (.dbf)"
- name: prj
type: File
doc: "The projection file (.prj)"
- name: cpg
type: File?
doc: "The character encoding file (.cpg) (optional)"
- name: qpj
type: File?
doc: "The additional projection file (.qpj) (optional)"
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