-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgraph-genome-previz.cwl
82 lines (71 loc) · 2.24 KB
/
graph-genome-previz.cwl
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
requirements:
ScatterFeatureRequirement: {}
StepInputExpressionRequirement: {}
inputs:
pangenome:
label: GFA1 or GFA2 format
type: File
# format: GFA1 or GFA2
bin_widths:
type: int[]
default: [ 1, 4, 16, 64, 256, 1000, 4000, 16000]
doc: width of each bin in basepairs along the graph vector
cells_per_file:
type: int
default: 5000
doc: Cells per file on component_segmentation
steps:
build_sparse_matrix_graph:
label: Build the sparse matrix form of the gfa graph
run: tools/odgi/odgi_build.cwl
in:
graph: pangenome
out: [ sparse_graph_index ]
# sort_paths:
# label: Sort paths by 1D sorting
# run: tools/odgi/odgi_sort.cwl
# in:
# pipeline_specification:
# default: "bSnSnS"
# sparse_graph_index: build_sparse_matrix_graph/sparse_graph_index
# sgd_use_paths:
# default: true
# sort_paths_max:
# default: true
# out: [ sorted_sparse_graph_index ]
bin_paths:
run: tools/odgi/odgi_bin.cwl
in:
sparse_graph_index: build_sparse_matrix_graph/sparse_graph_index
bin_width: bin_widths
scatter: bin_width
out: [ bins, pangenome_sequence ]
index_paths:
label: Create path index
run : tools/odgi/odgi_pathindex.cwl
in:
sparse_graph_index: build_sparse_matrix_graph/sparse_graph_index
out: [ indexed_paths ]
segment_components:
label: Run component segmentation
run: tools/graph-genome-segmentation/component_segmentation.cwl
in:
bins: bin_paths/bins
cells_per_file: cells_per_file
pangenome_sequence:
source: bin_paths/pangenome_sequence
valueFrom: $(self[0])
# the bin_paths step is scattered over the bin_width array, but always using the same sparse_graph_index
# the pangenome_sequence that is extracted is exactly the same for the same sparse_graph_index
# regardless of bin_width, so we take the first pangenome_sequence as input for this step
out: [ colinear_components ]
outputs:
indexed_paths:
type: File
outputSource: index_paths/indexed_paths
colinear_components:
type: Directory
outputSource: segment_components/colinear_components