forked from BCCDC-PHL/covflo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
189 lines (147 loc) · 3.79 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
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
185
186
187
188
189
manifest {
name = 'COVFLO'
author = 'Jessica M Caleta'
homePage = 'https://github.com/j3551ca/covflo'
description = 'Phylogenetics in Nextflow'
mainScript = 'main.nf'
version = '1.0.2'
}
//paramater-defining functions:
def robust_path(dir) {
if (dir.toString() =~ /[^\/]$/) {
work_dir = dir.toString() + '/'
}
else {
work_dir = dir.toString()
}
return work_dir
}
//pipeline parameters
params {
//help message
help = null
//version number
version = null
//conda env local cache
conda_cache = null
//user-defined directory containing config/ & data/ folders
dir = "/path/to/data/"
//absolute path to data with trailing /
work_dir = robust_path(params.dir)
//reference for alignment
ref = "${params.work_dir}config/Ref.gb"
//input sequences
seqs = "${params.work_dir}data/sequences.fasta"
//metadata of input sequences
meta = "${params.work_dir}data/metadata.csv"
//strains that are excluded
drop_strains = "${params.work_dir}config/dropped_strains.txt"
//strains that are included
keep_strains = "${params.work_dir}config/included_strains.txt"
//colors used in final auspice visualization
colors = "${params.work_dir}config/colors.csv"
//latitude and longitudes
lat_long = "${params.work_dir}config/lat_longs.csv"
//details for auspice visualization
auspice = "${params.work_dir}config/auspice_config.json"
//maximum allowable percentage of N in a seq
n_cutoff="0.15"
//clipkit algorithm to use
clip_option="kpic-smart-gap"
//minimum branch length for RAxML
bl_min=0.0000000001
//precision of rounding for branch length
precision=6
//length of branches to be collapsed
length=0
//timetree coalescent timescale
coalescent="const"
//timetree node date estimates
date_inference="marginal"
//timetree units of divergence measurement
divergence_units = "mutations"
//timetree clock rate
clock_rate = 0.0008
//timetree standard deviation of clock rate
clock_std_dev = 0.0004
//type of inference
inference="joint"
//R process prob 0.8 previous probs
trans_probs_80 = "${params.work_dir}config/SARS-CoV-2_0.8_TransProbs.txt"
//R process prob 0.8 previous clusters
gen_clusts_80 = "${params.work_dir}config/SARS-CoV-2_0.8_GenomicClusters.txt"
//R process prob 0.9 previous probs
trans_probs_90 = "${params.work_dir}config/SARS-CoV-2_0.9_TransProbs.txt"
//R process prob 0.9 previous clusters
gen_clusts_90 = "${params.work_dir}config/SARS-CoV-2_0.9_GenomicClusters.txt"
}
//seamlessly run pipeline on different execution systems by modifying
//the process section of the config file. ex. AWS, SLURM, sun grid engine:
process {
cpus = 32
withName: percent {
cpus = 28
}
withName: replace {
cpus = 28
}
withName: dedup {
cpus = 28
}
withName: compress {
cpus = 28
}
withName: fasttree {
cpus = 32
}
withName: resolve {
cpus = 32
}
withName: branches {
cpus = 32
}
withName: round {
cpus = 32
}
withName: refine {
cpus = 32
}
withName: clusters {
conda = "${projectDir}/envs/r421.yml"
//"/home/jess.cal/.conda/envs/r421"
}
withName: condense {
conda = "${projectDir}/envs/treecluster.yml"
//"/home/jess.cal/.conda/envs/treecluster"
}
}
profiles {
conda {
process.conda = "${projectDir}/envs/nextstrain.yml"
//"/home/covid19.analysis/.conda/envs/nextstrain"
conda.useMamba = true
conda.createTimeout = '1 h'
if (params.conda_cache) {
conda.cacheDir = params.conda_cache
}
}
//can add docker here
}
//html displaying breakdown of time taken to execute workflow
timeline {
enabled = true
overwrite = true
file = "${params.work_dir}reports/covflo_timeline.html"
}
//html of cpu/mem usage
report {
enabled = true
overwrite = true
file = "${params.work_dir}reports/covflo_usage.html"
}
//dag of covflo workflow
dag {
enabled = true
overwrite = true
file = "${params.work_dir}reports/covflo_dag.html"
}