-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
154 lines (137 loc) · 5.27 KB
/
nextflow.config
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
// Copyright (C) 2022 Roberto Rossini <[email protected]>
//
// SPDX-License-Identifier: MIT
params {
// IO options
sample_sheet = null // required when 'hic_file' is undefined
sample = null // required when 'sample_sheet' is undefined
hic_file = null // required when 'sample_sheet' is undefined
resolution = null // required when 'sample_sheet' is undefined
tads = null
mask = null
outdir = "results/"
publish_dir_mode = 'copy'
// Mask files
cytoband = null
assembly_gaps = null
// Balancing options
hicexplorer_hic_norm = 'SCALE'
hicexplorer_cool_norm = 'weight'
// NCHG options
nchg_mad_max = 5
nchg_bad_bin_fraction = 0.1
nchg_fdr_cis = 0.01
nchg_log_ratio_cis = 1.5
nchg_fdr_trans = 0.01
nchg_log_ratio_trans = 1.5
// Clique options
clique_size_thresh = 3
call_cis_cliques = true
call_trans_cliques = false
// Plotting options
plot_format = 'png'
hic_tgt_resolution_plots = 500000 // Approximate Hi-C data resolution used for plotting
plot_sig_interactions_cmap_lb = null // Lower bound for the color map used to plot significant iteractions. Set to nchg_log_ratio when not specified
plot_sig_interactions_cmap_ub = 2.0 // Upper bound for the color map used to plot significant iteractions
skip_expected_plots = false
skip_sign_interaction_plots = false
// Compression level used to compress intermediate files
zstd_compression_lvl = 8
}
process {
container = 'ghcr.io/robomics/call_tad_cliques/utils:1.0.0'
withName:"SAMPLESHEET:CHECK_SYNTAX" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"SAMPLESHEET:CHECK_FILES" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"TADS:SELECT_NORMALIZATION_METHOD" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"TADS:APPLY_NORMALIZATION" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"TADS:HICEXPLORER_FIND_TADS" {
container = 'ghcr.io/robomics/call_tad_cliques/hicexplorer:3.7.4'
}
withName:"NCHG:GENERATE_MASK" {
container = 'ghcr.io/robomics/call_tad_cliques/py-utils:1.0.1'
}
withName:"NCHG:GENERATE_CHROMOSOME_PAIRS" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"NCHG:DUMP_CHROM_SIZES" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"NCHG:COMPUTE" {
container = 'ghcr.io/robomics/call_tad_cliques/nchg:bc29ebf'
}
withName:"NCHG:MERGE" {
container = 'ghcr.io/robomics/call_tad_cliques/nchg:bc29ebf'
}
withName:"NCHG:FILTER" {
container = 'ghcr.io/robomics/call_tad_cliques/nchg:bc29ebf'
}
withName:"NCHG:VIEW" {
container = 'ghcr.io/robomics/call_tad_cliques/nchg:bc29ebf'
}
withName:"NCHG:EXPECTED" {
container = 'ghcr.io/robomics/call_tad_cliques/nchg:bc29ebf'
}
withName:"NCHG:PLOT_EXPECTED" {
container = 'ghcr.io/robomics/call_tad_cliques/plotting:1.0.0'
}
withName:"NCHG:GET_HIC_PLOT_RESOLUTION" {
container = 'ghcr.io/robomics/call_tad_cliques/hictkpy:0.0.5'
}
withName:"NCHG:PLOT_SIGNIFICANT" {
container = 'ghcr.io/robomics/call_tad_cliques/plotting:1.0.0'
}
withName:"CLIQUES:CALL" {
container = 'ghcr.io/robomics/call_tad_cliques/call-cliques:1.0.0'
}
withName:"CLIQUES:MASK" {
container = 'ghcr.io/robomics/call_tad_cliques/py-utils:1.0.1'
}
withName:"CLIQUES:PLOT_MAXIMAL_CLIQUE_SIZE_DISTRIBUTION_BY_TAD" {
container = 'ghcr.io/robomics/call_tad_cliques/plotting:1.0.0'
}
withName:"CLIQUES:PLOT_CLIQUE_SIZE_DISTRIBUTION" {
container = 'ghcr.io/robomics/call_tad_cliques/plotting:1.0.0'
}
}
includeConfig 'config/base.config'
// Source: https://github.com/nf-core/rnaseq/blob/f801b1eda588b5247a027806562dc880f872a981/nextflow.config
// Function to ensure that resource requirements don't go beyond
// a maximum limit
def check_max(obj, type) {
if (type == 'memory') {
try {
if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
return params.max_memory as nextflow.util.MemoryUnit
else
return obj
} catch (all) {
println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'time') {
try {
if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
return params.max_time as nextflow.util.Duration
else
return obj
} catch (all) {
println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
return obj
}
} else if (type == 'cpus') {
try {
return Math.min( obj, params.max_cpus as int )
} catch (all) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}