@@ -146,41 +146,66 @@ draft_metrics: \
146
146
147
147
# Correct misassemblies using Tigmint
148
148
tigmint : \
149
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa \
149
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa \
150
150
$(draft ) .tigmint.fa
151
151
152
+ # Index the linked reads
153
+ tigmint-index : $(draft ) .fa.bwt
154
+
155
+ # Align the linked reads (using bwa mem)
156
+ tigmint-align : $(draft ) .$(reads ) .sortbx.bam
157
+
158
+ # Perform the tigmint-molecule step for linked reads
159
+ tigmint-molecule : $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist$(dist ) .bed
160
+
161
+ # Perform the final tigmint-cut step for linked reads
162
+ tigmint-cut : \
163
+ $(draft).$(reads).as$(as).nm$(nm).molecule.size$(minsize).dist$(dist).trim$(trim).window$(window).span$(span).breaktigs.fa \
164
+ $(draft).tigmint.fa
165
+
152
166
# Correct misassemblies for long reads using Tigmint
153
167
tigmint-long : \
154
- $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa \
168
+ $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa \
155
169
$(draft ) .cut$(cut ) .tigmint.fa
156
170
171
+ # Estimate the tigmint parameters for long reads
172
+ tigmint-long-estimate : $(reads ) .tigmint-long.params.tsv
173
+
174
+ # Covert the long reads to pseudo-linked reads, perform minimap2 alignment and the tigmint-molecule step
175
+ tigmint-long-to-linked : $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .dist$(dist ) .bed
176
+
177
+ # Perform the final tigmint-cut step for long reads
178
+ tigmint-long-cut : \
179
+ $(draft).$(reads).cut$(cut).molecule.size$(minsize).dist$(dist).trim$(trim).window$(window).span$(span).breaktigs.fa \
180
+ $(draft).cut$(cut).tigmint.fa
181
+
157
182
# Calculate assembly metrics after Tigmint
158
183
tigmint_metrics : \
159
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.abyss-fac.tsv \
160
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.scaftigs.abyss-fac.tsv \
161
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.scaftigs.$(ref ) .samtobreak.tsv
184
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.abyss-fac.tsv \
185
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.scaftigs.abyss-fac.tsv \
186
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.scaftigs.$(ref ) .samtobreak.tsv
162
187
163
188
# Scaffold using ARCS
164
189
arcs : \
165
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.fa \
190
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.fa \
166
191
$(draft ) .tigmint.arcs.fa
167
192
168
193
# Calculate assembly metrics after ARCS
169
194
arcs_metrics : \
170
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.abyss-fac.tsv \
171
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.scaftigs.abyss-fac.tsv \
172
- $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.scaftigs.$(ref ) .samtobreak.tsv
195
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.abyss-fac.tsv \
196
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.scaftigs.abyss-fac.tsv \
197
+ $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r .arcs.a$a_l$l .links.scaftigs.$(ref ) .samtobreak.tsv
173
198
174
199
# Symlink the Tigmint results
175
- $(draft ) .tigmint.fa : $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa
200
+ $(draft ) .tigmint.fa : $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa
176
201
ln -sf $< $@
177
202
178
203
# Symlink the long read Tigmint results
179
- $(draft ) .cut$(cut ) .tigmint.fa : $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa
204
+ $(draft ) .cut$(cut ) .tigmint.fa : $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.fa
180
205
ln -sf $< $@
181
206
182
207
# Symlink the ARCS results
183
- $(draft ) .tigmint.arcs.fa : $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r.arcs.a$a_l$l.links.fa
208
+ $(draft ) .tigmint.arcs.fa : $(draft ) .$(reads ) .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . trim$(trim ) .window$(window ) .span$(span ) .breaktigs.$(reads ) .c$c_e$e_r$r.arcs.a$a_l$l.links.fa
184
209
ln -sf $< $@
185
210
186
211
# BWA
@@ -207,30 +232,14 @@ ifeq ($G, 0)
207
232
endif
208
233
endif
209
234
210
- # Segment long reads from gzipped fasta file, optionally calculating tigmint-long parameters.
211
- $(reads ) .cut$(cut ) .fq.gz : $(longreads ) check_span_g
212
- ifeq ($(span ) , auto)
213
- ifeq ($(dist ) , auto)
214
- $(gtime) $(gzip) -dc $(longreads) | $(bin)/long-to-linked -l$(cut) -m$(minsize) -g$G -s -d -o $(reads).tigmint-long.params.tsv | $(gzip) > $@
215
- else
216
- $(gtime) $(gzip) -dc $(longreads) | $(bin)/long-to-linked -l$(cut) -m$(minsize) -g$G -s -o $(reads).tigmint-long.params.tsv | $(gzip) > $@
217
- endif
218
- else
219
- ifeq ($(dist ) , auto)
220
- $(gtime) $(gzip) -dc $(longreads) | $(bin)/long-to-linked -l$(cut) -m$(minsize) -d -o $(reads).tigmint-long.params.tsv | $(gzip) > $@
221
- else
222
- $(gtime) $(gzip) -dc $(longreads) | $(bin)/long-to-linked -l$(cut) -m$(minsize) | $(gzip) > $@
223
- endif
224
- endif
225
-
226
235
# samtools
227
236
228
237
# Index a FASTA file.
229
238
% .fa.fai : % .fa
230
239
samtools faidx $<
231
240
232
241
# Create molecule extents BED
233
- % .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .bed : % .sortbx.bam
242
+ % .as$(as ) .nm$(nm ) .molecule.size$(minsize ) .dist $( dist ) . bed : % .sortbx.bam
234
243
$(gtime ) $(bin ) /tigmint_molecule.py -a$(as ) -n$(nm ) -q$(mapq ) -d$(dist ) -s$(minsize ) $< | sort -k1,1 -k2,2n -k3,3n > $@
235
244
236
245
# Estimate dist parameter for tigmint-long
@@ -240,7 +249,13 @@ $(reads).tigmint-long.params.tsv: $(longreads)
240
249
$(bin ) /tigmint_estimate_dist.py - -n $(dist_sample ) -o $@ '
241
250
242
251
# Create molecule extents BED using cut long reads
243
- $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .bed : $(longreads ) $(draft ) .fa $(reads ) .tigmint-long.params.tsv check_span_g
252
+ $(draft ) .$(reads ) .cut$(cut ) .molecule.size$(minsize ) .dist$(dist ) .bed : $(longreads ) $(draft ) .fa $(reads ) .tigmint-long.params.tsv
253
+ ifeq ($(span ) , auto)
254
+ ifeq ($G, 0)
255
+ $(error Must set genome size parameter (G) to calculate span automatically)
256
+ endif
257
+ endif
258
+
244
259
ifeq ($(dist ) , auto)
245
260
$(gtime) $(bin)/../src/long-to-linked-pe -l $(cut) -m$(minsize) -g$G -s -b $(reads).barcode-multiplicity.tsv --bx -t$t --fasta -f $(reads).tigmint-long.params.tsv $< | \
246
261
minimap2 -y -t$t -x map-$(longmap) --secondary=no $(draft).fa - | \
0 commit comments