-
Notifications
You must be signed in to change notification settings - Fork 0
/
evalNaturalSeqs.nf
executable file
·549 lines (465 loc) · 20 KB
/
evalNaturalSeqs.nf
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
#!/usr/bin/env nextflow
/*
vim: syntax=groovy
evalNaturalSeqs.nf : Evaluate multiple alignment programs on natural TE family
Parameters:
--outputDir <dir> : Directory to store the results
--familyDir <dir> : Directory where a benchmark family is found
--curated_protein <file> : File containing the hand-curated protein for the family
--db_proteins <file> : File containing the related db proteins for the family
--muscle : Run Muscle [optional]
--refiner : Run Refiner [optional]
--dialign : Run DialignTX [optional]
--tcoffee : Run TCoffee [optional]
--probcons : Run Probcons [optional]
--kalign : Run Kalign [optional]
--fsa : Run FSA [optional]
--clustalo : Run ClustalOmega [optional]
--mafft : Run Mafft [optiona]
--cluster : Either "local", "quanah", "hrothgar" or "griz"
default="local"
Robert Hubley, 12/2020
*/
// Defaults
params.cluster = "local"
params.muscle = false
params.refiner = false
params.clustalo = false
params.mafft = false
params.fsa = false
params.dialign = false
params.tcoffee = false
params.probcons = false
params.kalign = false
params.familyDir = "undefined"
params.outputDir = "results"
params.curated_protein = "undefined"
params.db_proteins = "undefined"
runMuscle = params.muscle
runRefiner = params.refiner
runMafft = params.mafft
runClustalO = params.clustalo
runDialign = params.dialign
runKalign = params.kalign
runTCoffee = params.tcoffee
runProbcons = params.probcons
runFSA = params.fsa
outputDir = params.outputDir
// Default software dependencies ( see localizations in cluster sections )
blastDir = "/usr/local/rmblast/bin"
hmmerDir = "/usr/local/hmmer/bin"
mafftDir = "/usr/local/mafft/bin"
//dialignDir = "/usr/local/dialign-2.2.1"
dialignDir = "/usr/local/dialign-tx-1.0.2"
kalignDir = "/usr/local/kalign2"
tcoffeeDir = "/usr/local/t_coffee/bin"
probconsDir = "/usr/local/probcons/bin"
clustalOmegaDir = "/u1/local/clustal-omega-1.2.4-binary"
fsaDir = "/usr/local/fsa/bin"
muscleDir = "/usr/local/bin"
exonerateDir = "/usr/local/exonerate-2.2.0-x86_64/bin"
repeatmodelerDir = "/home/rhubley/projects/RepeatModeler"
// Generate a series of samples from the orffrags file increasing in size:
// 100, 150, 200, 250, 300, 350, 400, 450, 500, 1000
seqFile = file( params.familyDir + "/orffrags.fa")
//
curated_protein = file(params.curated_protein)
db_proteins = file(params.db_proteins)
//
// Setup executor for different environments, particularly
// well-known-environments.
//
if ( params.cluster == "local" ) {
thisExecutor = "local"
thisQueue = ""
thisOptions = ""
thisScratch = false
}else if ( params.cluster == "quanah" || params.cluster == "hrothgar" ){
proc = 12
thisExecutor = "sge"
thisQueue = "omni"
thisOptions = "-pe sm ${proc} -P quanah -S /bin/bash"
ucscToolsDir="/home/rhubley/ucscTools"
repeatMaskerDir="/home/rhubley/RepeatMasker"
thisScratch = false
}else if ( params.cluster == "griz" ) {
proc = 12
thisExecutor = "slurm"
//thisQueue = "wheeler_lab_small_cpu"
thisQueue = "wheeler_lab_large_cpu"
thisOptions = "--tasks=1 --cpus-per-task=${proc}"
ucscToolsDir="/home/rh105648e/ucscTools"
repeatMaskerDir="/home/rh105648e/RepeatMasker-4.1.1"
thisScratch = "/state/partition1"
}
log.info "evalNaturalSeqs.nf : Multiple Alignment Evaluation ver 0.1"
log.info "============================================================"
log.info "working directory : " + workflow.workDir
log.info "RepeatModeler DIR : " + repeatmodelerDir
log.info "Family DIR : " + params.familyDir
log.info "Curated Protein File: " + params.curated_protein
log.info "DB Proteins : " + params.db_proteins
if ( runMuscle ) {
log.info "Muscle DIR : " + muscleDir
}
if ( runMafft ) {
log.info "Mafft DIR : " + mafftDir
}
if ( runClustalO ) {
log.info "ClustalOmega DIR : " + clustalOmegaDir
}
if ( runTCoffee ) {
log.info "TCoffee DIR : " + tcoffeeDir
}
if ( runProbcons ) {
log.info "ProbCons DIR : " + probconsDir
}
if ( runRefiner ) {
log.info "Refiner DIR : " + repeatmodelerDir
}
if ( runDialign ) {
log.info "Dialign DIR : " + dialignDir
}
if ( runKalign ) {
log.info "Kalign DIR : " + kalignDir
}
if ( runFSA ) {
log.info "FSA DIR : " + fsaDir
}
log.info "Cluster : " + params.cluster
log.info "Output DIR : " + outputDir
log.info "Queue/Partititon : " + thisQueue
process generateSamples {
publishDir "${outputDir}", mode: 'copy'
input:
file seqFile
output:
file "*sample.fa" into benchmarkFilesForClustalO
file "*sample.fa" into benchmarkFilesForMafft
file "*sample.fa" into benchmarkFilesForMuscle
file "*sample.fa" into benchmarkFilesForRefiner
file "*sample.fa" into benchmarkFilesForKalign
file "*sample.fa" into benchmarkFilesForDialign
file "*sample.fa" into benchmarkFilesForFSA
file "*sample.fa" into benchmarkFilesForTCoffee
file "*sample.fa" into benchmarkFilesForProbcons
file "" into benchmarkFilesForBaseline
file "*sample.fa"
script:
"""
#
# Generate samples of various sizes.
# The random seed 1608835988 produced the paper results
#
${workflow.projectDir}/util/sampleFromFA.pl "100,150,200,250,300,350,400,450,500,1000" ${seqFile} 1608835988
"""
}
process runFSA {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForFSA.flatten()
when:
runFSA
output:
file "*-fsa.fa"
file "*-fsa.cons.fa"
file "*-fsa.blastx"
file "*-fsa.dbprot.blastx"
file "*-fsa.exonerate"
file "*-fsa.time"
script:
methodPrefix = "fsa"
sampleSize = (referenceSeqFile.name =~ /^.*\-(\d+)sample.fa/)[0][1]
"""
if [ ${sampleSize} -lt 350 ]
then
#### Run FSA
SECONDS=0
${fsaDir}/fsa ${referenceSeqFile} > ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
else
touch ${referenceSeqFile.baseName}-${methodPrefix}.fa
touch ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
echo "0" > ${referenceSeqFile.baseName}-${methodPrefix}.time
touch ${referenceSeqFile.baseName}-${methodPrefix}.blastx
touch ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
touch ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
fi
"""
}
// KAlign: https://msa.sbc.su.se/cgi-bin/msa.cgi
// parameters suggested by website for DNA
process runKalign {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForKalign.flatten()
when:
runKalign
output:
file "*-kalign.fa"
file "*-kalign.cons.fa"
file "*-kalign.blastx"
file "*-kalign.dbprot.blastx"
file "*-kalign.exonerate"
file "*-kalign.time"
script:
methodPrefix = "kalign"
"""
#### Run Kalign
SECONDS=0
${kalignDir}/kalign -gpo 80 -gpe 3 -tgpe 3 -bonus 0 ${referenceSeqFile} > ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
process runTCoffee {
cpus 16
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForTCoffee.flatten()
when:
runTCoffee
output:
file "*-tcoffee.fa"
file "*-tcoffee.cons.fa"
file "*-tcoffee.blastx"
file "*-tcoffee.dbprot.blastx"
file "*-tcoffee.exonerate"
file "*-tcoffee.time"
script:
methodPrefix = "tcoffee"
"""
SECONDS=0
${tcoffeeDir}/t_coffee -n_core 16 -thread 16 -max_n_proc 16 -seq ${referenceSeqFile} -output fasta_aln -outfile ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
process runProbcons {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForProbcons.flatten()
when:
runProbcons
output:
file "*-probcons.fa"
file "*-probcons.cons.fa"
file "*-probcons.blastx"
file "*-probcons.dbprot.blastx"
file "*-probcons.exonerate"
file "*-probcons.time"
script:
methodPrefix = "probcons"
"""
SECONDS=0
${probconsDir}/probcons ${referenceSeqFile} > ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
// DIALIGN: http://dialign.gobics.de/
// Switched to dialigntx because it does appear to perform better
process runDialign {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForDialign.flatten()
when:
runDialign
output:
file "*-dialign.fa"
file "*-dialign.cons.fa"
file "*-dialign.blastx"
file "*-dialign.dbprot.blastx"
file "*-dialign.exonerate"
file "*-dialign.time"
script:
methodPrefix = "dialign"
"""
#### Run Dialign
#export DIALIGN2_DIR=${dialignDir}/dialign2_dir
#${dialignDir}/dialign2-2 -n -fa -fn ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile}
#### Run Dialigntx
SECONDS=0
${dialignDir}/dialign-tx -D ${dialignDir}/conf ${referenceSeqFile} ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
process runClustalO {
cpus 16
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForClustalO.flatten()
when:
runClustalO
output:
file "*-clustalo.fa"
file "*-clustalo.cons.fa"
file "*-clustalo.blastx"
file "*-clustalo.dbprot.blastx"
file "*-clustalo.exonerate"
file "*-clustalo.time"
script:
methodPrefix = "clustalo"
"""
SECONDS=0
#### Run ClustalOmega
${clustalOmegaDir}/clustalo --infile=${referenceSeqFile} --outfile=${referenceSeqFile.baseName}-${methodPrefix}.fa --outfmt=FASTA --threads 16
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
process runMafft {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForMafft.flatten()
when:
runMafft
output:
file "*-mafft.fa"
file "*-mafft.cons.fa"
file "*-mafft.blastx"
file "*-mafft.dbprot.blastx"
file "*-mafft.exonerate"
file "*-mafft.time"
script:
methodPrefix = "mafft"
"""
#### Run MAFFT
# generate a filename like gput100-train-mafft.fa for output
# E-INS-i : --genafpair --maxiterate 1000
# L-INS-i : --localpair --maxiterate 1000
# G-INS-i : --globalpair --maxiterate 1000
SECONDS=0
${mafftDir}/mafft --localpair --maxiterate 1000 ${referenceSeqFile} | perl -ne '{ if ( /^>/ ) { print; } else { print uc(\$_); } }' > ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
process runMuscle {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForMuscle.flatten()
when:
runMuscle
output:
file "*-muscle.fa"
file "*-muscle.cons.fa"
file "*-muscle.blastx"
file "*-muscle.dbprot.blastx"
file "*-muscle.exonerate"
file "*-muscle.time"
script:
methodPrefix = "muscle"
"""
# Run muscle and generate a filename like gput100-train-muscle.fa for output
SECONDS=0
${muscleDir}/muscle -in ${referenceSeqFile} -out ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
process runRefiner {
publishDir "${outputDir}", mode: 'copy'
input:
file curated_protein
file db_proteins
file referenceSeqFile from benchmarkFilesForRefiner.flatten()
when:
runRefiner
output:
file "*-refiner.fa"
file "*-refiner.cons.fa"
file "*-refiner.blastx"
file "*-refiner.dbprot.blastx"
file "*-refiner.exonerate"
file "*-refiner.time"
script:
methodPrefix = "refiner"
"""
SECONDS=0
# Run refiner and generate a filename like gput100-train-refiner.fa for output
${repeatmodelerDir}/Refiner ${referenceSeqFile} >& ${referenceSeqFile.baseName}-${methodPrefix}.log
## eval Auto Run Blocker
#${repeatmodelerDir}/util/Linup ${referenceSeqFile}.refiner.stk > alistart
#${repeatmodelerDir}/util/protocol/AutoRunBlocker.pl -l alistart -w 7 -mc 4 -mr 2 > cons
#${repeatmodelerDir}/util/alignAndCallConsensus.pl -c cons -e ${referenceSeqFile}
#${repeatmodelerDir}/util/protocol/AutoRunBlocker.pl -l alistart -w 15 -mc 4 -mr 2 > cons
#${repeatmodelerDir}/util/alignAndCallConsensus.pl -c cons -e ${referenceSeqFile}
#${repeatmodelerDir}/util/protocol/AutoRunBlocker.pl -l alistart -w 24 -mc 4 -mr 2 > cons
#${repeatmodelerDir}/util/alignAndCallConsensus.pl -c cons -e ${referenceSeqFile}
#${repeatmodelerDir}/util/protocol/AutoRunBlocker.pl -l alistart -w 5 -mc 4 -mr 2 > cons
#${repeatmodelerDir}/util/alignAndCallConsensus.pl -re -c cons -e ${referenceSeqFile}
#${repeatmodelerDir}/util/Linup -msa rep.out > ${referenceSeqFile.baseName}-${methodPrefix}.fa
##
mv ${referenceSeqFile}.refiner_cons ${referenceSeqFile}-refiner.cons.fa
${repeatmodelerDir}/util/Linup -msa ${referenceSeqFile}.refiner.stk > ${referenceSeqFile.baseName}-${methodPrefix}.fa
echo \$SECONDS > ${referenceSeqFile.baseName}-${methodPrefix}.time
# Gen cons and eval
${repeatmodelerDir}/util/Linup -consensus -name ${referenceSeqFile.baseName}-${methodPrefix} ${referenceSeqFile.baseName}-${methodPrefix}.fa > ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.blastx
${blastDir}/blastx -query ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa -subject ${db_proteins} > ${referenceSeqFile.baseName}-${methodPrefix}.dbprot.blastx
${exonerateDir}/exonerate ${referenceSeqFile.baseName}-${methodPrefix}.cons.fa ${curated_protein} > ${referenceSeqFile.baseName}-${methodPrefix}.exonerate
"""
}
workflow.onComplete {
log.info """
Pipeline execution summary
---------------------------
Completed at: ${workflow.complete}
Duration : ${workflow.duration}
Success : ${workflow.success}
workDir : ${workflow.workDir}
exit status : ${workflow.exitStatus}
Error report: ${workflow.errorReport ?: '-'}
"""
}