-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.plan
More file actions
48 lines (38 loc) · 1.12 KB
/
build.plan
File metadata and controls
48 lines (38 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
build = lathe.Workflow("build")
addSifterTasks = function(dir) {
lathe.Plugin(`sifter scan scripts -j -b ./ ${dir}`).map( x => {
out = {
commandLine: `sifter run ${x.path}`,
inputs: {},
outputs: {},
}
x.inputs.forEach( (y,i) => {
out["inputs"][`input_${i}`] = y
})
x.outputs.forEach( (y,i) => {
out["outputs"][`output_${i}`] = y
})
return out
}).forEach( x => {
build.Add(lathe.Process(x))
})
}
addSifterTasks("./transform")
alleleFiles = {}
lathe.Plugin("sifter scan objects -s -j ./transform").filter(x => {
return x["objectType"] == "Allele"
}).forEach( (x,i) => {
//println(x["outFile"])
alleleFiles[ `allele_${i}` ] = x["outFile"]
})
build.Add(lathe.Process({
shell: "cat {{#each inputs}} {{ this }}{{/each}} > {{outputs.mergeFile}}",
outputs: {
mergeFile: "output-normalize/allele.merge.json.gz"
},
inputs: alleleFiles
}))
addSifterTasks("./normalize")
p = lathe.LoadPlan("./normalize/allele/process.plan")
build.Add(p["build"])
addSifterTasks("./graph-build")