-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmodules.config
More file actions
150 lines (127 loc) · 4.97 KB
/
modules.config
File metadata and controls
150 lines (127 loc) · 4.97 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
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 {
publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode,
]
withName: 'ASSEMBLYSCAN' {
ext.args = "--json"
}
withName: CUTN_TARGET {
ext.args = { "-n 10 -p 100000" }
}
withName: CUTN_QUERY {
ext.args = { "-n 10 -p 100000" }
}
withName: 'ALIGNMENT_LASTDB' {
// See https://gitlab.com/mcfrith/last/-/blob/main/doc/lastdb.rst for details
// -R01: uppercase all sequences and then lowercase simple repeats with tantan
// -R10: keep original lowercase masking
// -c: soft-mask lowercase letters
// -S2: index both strands
ext.args = { "${params.softmask=="tantan" ? '-R01' : '-R11'} -c -u${params.seed} -S2" }
publishDir = [
enabled: false
]
}
withName: 'ALIGNMENT_SPLIT_O2M' {
ext.prefix = { "${meta.id}.o2m_aln" }
ext.args = { "--reverse -m${params.last_split_mismap}" }
}
withName: 'ALIGNMENT_SPLIT_M2O' {
ext.prefix = { "${meta.id}.m2o_aln" }
ext.args = { "-m${params.last_split_mismap}" }
}
withName: 'ALIGNMENT_SPLIT_O2O' {
ext.prefix = { "${meta.id}.o2o_aln" }
ext.args = { "--reverse -m${params.last_split_mismap}" }
}
withName: 'ALIGNMENT_TRAIN' {
// If the training step fails, it is likely that there are no
// alignments to be found with the selected seed. Ignore and therefore
// skip alignments instead of crashing the pipeline.
errorStrategy = { task.exitStatus in (130..145) ? 'retry' : task.exitStatus == 1 ? 'ignore' : 'finish' }
ext.args = { "--revsym ${params.lastal_args}" }
}
withName: 'ALIGNMENT_LASTAL_M2O' {
ext.prefix = { "${meta.id}.m2o_aln" }
ext.args = { "--split-f=MAF+ ${params.lastal_args} ${params.lastal_extr_args}" }
publishDir = [
enabled: false
]
}
withName: 'ALIGNMENT_LASTAL_M2M' {
ext.prefix = { "${meta.id}.m2m_aln" }
ext.args = { "${params.lastal_args} ${params.lastal_extr_args}" }
}
withName: 'LAST_DOTPLOT' {
// The number one cause of failure is absence of alignments.
errorStrategy = { task.exitStatus in (130..145) ? 'retry' : task.exitStatus == 1 ? 'ignore' : 'finish' }
ext.args = { "--rot2=h --sort2=3 --strands2=1 --width=${params.dotplot_width} --height=${params.dotplot_height} --fontsize=${params.dotplot_font_size} ${params.dotplot_options}" }
}
withName: 'ALIGNMENT_DOTPLOT_O2O' {
ext.prefix = { "${meta.id}.o2o_plt" }
}
withName: 'ALIGNMENT_DOTPLOT_M2O' {
ext.prefix = { "${meta.id}.m2o_plt" }
}
withName: 'ALIGNMENT_DOTPLOT_O2M' {
ext.prefix = { "${meta.id}.o2m_plt" }
}
withName: 'ALIGNMENT_DOTPLOT_M2M' {
ext.prefix = { "${meta.id}.m2m_plt" }
}
withName: 'ALIGNMENT_DOTPLOT_O2O_FLT' {
ext.prefix = { "${meta.id}.o2o_plt_filtered" }
}
withName: 'ALIGNMENT_DOTPLOT_M2O_FLT' {
ext.prefix = { "${meta.id}.m2o_plt_filtered" }
}
withName: 'ALIGNMENT_DOTPLOT_O2M_FLT' {
ext.prefix = { "${meta.id}.o2m_plt_filtered" }
}
withName: 'ALIGNMENT_DOTPLOT_M2M_FLT' {
ext.prefix = { "${meta.id}.m2m_plt_filtered" }
}
withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
publishDir = [
path: { "${params.outdir}/multiqc" },
mode: params.publish_dir_mode,
]
}
withName: 'MULTIQC_ASSEMBLYSCAN_PLOT_DATA' {
publishDir = [
path: { "${params.outdir}/multiqc/assemblyscan_plot_data" },
mode: params.publish_dir_mode,
]
}
withName: 'SAMTOOLS_BGZIP' {
publishDir = publishDir + [
path: { "${params.outdir}/alignment" }
]
}
withName: 'SAMTOOLS_FAIDX' {
publishDir = [
path: { "${params.outdir}/alignment" },
mode: params.publish_dir_mode,
saveAs: { filename -> (filename.endsWith('.sizes')) ? null : filename }
]
}
withName: 'SAMTOOLS_DICT' {
ext.args = { "-u ./${fasta} -a ${meta.id}" }
publishDir = [
enabled: false
]
}
}