-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmodules.config
More file actions
executable file
·184 lines (152 loc) · 5.98 KB
/
modules.config
File metadata and controls
executable file
·184 lines (152 loc) · 5.98 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Config file for defining DSL2 per module options and publishing paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Available keys to override module options:
ext.args = Additional arguments appended to command in module.
ext.args2 = Second set of arguments appended to command in module (multi-tool modules).
ext.args3 = Third set of arguments appended to command in module (multi-tool modules).
ext.prefix = File name prefix for output files.
----------------------------------------------------------------------------------------
*/
process {
withName: CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
pattern: '*_versions.yml'
]
}
withName: 'SNAPSHOT_SRES|PRETEXTMAP_HIGHRES|PRETEXTMAP_STANDRD' {
publishDir = [
path: { "${params.outdir}/pretext_maps_raw" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: 'PRETEXT_GRAPH' {
publishDir = [
path: { "${params.outdir}/pretext_maps_processed" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
// Coverge and repeat, gap, telo
withName: 'BED2BW_NORMAL|BED2BW_LOG|BEDTOOLS_MERGE_MAX|FINDHALFCOVERAGE|BEDTOOLS_MERGE_MIN|GAP_LENGTH|EXTRACT_TELO' {
publishDir = [
path: { "${params.outdir}/accessory_files" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: AVGCOV {
ext.args = "-T ./"
}
withName: GNU_SORT_A {
ext.args = { "-k1,1 -k2,2n" }
ext.suffix = { "intersect" }
}
withName: GNU_SORT_B {
ext.args = { "-k1,1 -k2,2n" }
ext.suffix = { "genome" }
}
withName: GNU_SORT_C {
ext.args = { "-k1,1 -k2,2n" }
ext.suffix = { "bins" }
}
withName: BEDTOOLS_MAKEWINDOWS {
ext.args = { "-w 10000" }
}
withName: BEDTOOLS_INTERSECT {
ext.prefix = { "${meta.id}_INTERSECT" }
}
withName: BEDTOOLS_MAP {
ext.prefix = { "${meta.id}_MAPPED" }
ext.args = { "-c 4 -o sum" }
}
withName: SEQTK_CUTN {
ext.args = "-n 1"
}
//
// ACCESSORY_FILES -> LONGREAD_COVERAGE
//
withName: ".*:ACCESSORY_FILES:LONGREAD_COVERAGE:SAMTOOLS_VIEW_FILTER_PRIMARY" {
ext.args = "-b -hF 256"
ext.prefix = { "${meta.id}_view" }
}
withName: '.*:LONGREAD_COVERAGE:MINIMAP2_ALIGN' {
ext.args = {"-ax ${meta.readtype.equals("hifi") ? "map-hifi" : meta.readtype.equals("clr") ? "map-pb" : meta.readtype.equals("ont") ? "map-ont" : meta.readtype.equals("illumina") ? "sr" : ""} --cs=short ${reference.size() > 2.5e9 ? (" -I" + Math.ceil(reference.size()/1e9)+"G") : ""}" }
ext.args2 = { "-T ${meta.id}_tmp" }
ext.prefix = { "${meta.id}_alignment_${reference.getName().tokenize('.')[0]}" }
}
withName: '.*:.*:.*:LONGREAD_COVERAGE:SAMTOOLS_MERGE' {
ext.prefix = { "${meta.id}_merge" }
}
withName: '.*:LONGREAD_COVERAGE:BEDTOOLS_GENOMECOV' {
ext.args = "-bga -split"
ext.prefix = { "${meta.id}_genome2cov" }
}
withName: '.*:LONGREAD_COVERAGE:BEDTOOLS_MERGE_MAX' {
ext.args = "-d 50"
ext.prefix = { "maxdepth" }
}
withName: '.*:LONGREAD_COVERAGE:BEDTOOLS_MERGE_MIN' {
ext.args = "-d 50"
ext.prefix = { "zerodepth" }
}
withName: '.*:LONGREAD_COVERAGE:GNU_SORT' {
ext.args = "-k1,1 -k2,2n"
ext.prefix = { "${meta.id}_sorted" }
}
withName: '.*:LONGREAD_COVERAGE:BED2BW_NORMAL' {
ext.prefix = 'coverage'
}
withName: "FIND_TELOMERE_REGIONS" {
ext.find_telomere = "find_telomere"
}
withName: "FIND_TELOMERE_WINDOWS" {
ext.telomere_jar = "telomere.jar"
ext.telomere_jvm_params = "-Xms1g -Xmx1g"
}
withName: PRETEXTMAP_STANDRD {
ext.args = { "${meta.map_order.equals("length") ? "--sortby length": "--sortby nosort" } --mapq 0" }
ext.prefix = { "${meta.id}_normal_pi" }
}
withName: PRETEXTMAP_HIGHRES {
ext.args = { "${meta.map_order.equals("length") ? "--sortby length": "--sortby nosort" } --highRes --mapq 0" }
ext.prefix = { "${meta.id}_hr_pi" }
}
withName: ".*:PRETEXT_INGEST_SNDRD:PRETEXT_GRAPH" {
ext.args = { "--textureBuffer 1G" }
ext.prefix = { "${meta.id}_normal" }
}
withName: ".*:PRETEXT_INGEST_HIRES:PRETEXT_GRAPH" {
ext.args = { "--textureBuffer 1G" }
ext.prefix = { "${meta.id}_hr" }
}
withName: 'SNAPSHOT_SRES' {
ext.args = "--sequences '=full' --resolution 1440"
ext.prefix = { "${meta.id}_normal" }
}
withName: ".*:GENERATE_MAPS:HIC_BWAMEM2:CRAM_FILTER_ALIGN_BWAMEM2_FIXMATE_SORT" {
ext.args = ""
ext.args1 = "-F0xB00 -nt"
ext.args2 = { "-5SPCp -H'${rglines}'" }
ext.args3 = "-mpu"
ext.args4 = { "--write-index -l1" }
}
withName: ".*:GENERATE_MAPS:HIC_MINIMAP2:CRAM_FILTER_MINIMAP2_FILTER5END_FIXMATE_SORT" {
ext.args = ""
ext.args1 = ""
ext.args2 = { "-ax sr" }
ext.args3 = "-mpu"
ext.args4 = { "--write-index -l1" }
}
withName: CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
mode: params.publish_dir_mode,
pattern: '*_versions.yml'
]
}
}