@@ -33,8 +33,8 @@ params.resume = false
33
33
log. info """
34
34
35
35
╔╦╗┬ ┬┌─┐ ╔═╗─┐ ┬╔═╗┬─┐┌┬┐┬ ┬┬┌─┐┌┬┐
36
- ║ ├─┤├┤ ║╣ ┌┴┬┘║ ║├┬┘ │ ├─┤│└─┐ │
37
- ╩ ┴ ┴└─┘ ╚═╝┴ └─╚═╝┴└─ ┴ ┴ ┴┴└─┘ ┴
36
+ ║ ├─┤├┤ ║╣ ┌┴┬┘║ ║├┬┘ │ ├─┤│└─┐ │
37
+ ╩ ┴ ┴└─┘ ╚═╝┴ └─╚═╝┴└─ ┴ ┴ ┴┴└─┘ ┴
38
38
39
39
==============================================================================
40
40
annotations (GTF files) : ${ params.annotations}
@@ -58,26 +58,26 @@ The long, medium, short distance cut-offs are in the format: "int_num;ex_seq;ex_
58
58
Only exon matches respecting all cut-offs are considered homologous.
59
59
- int_num (0,1,2): Number of surrounding intron positions required to be conserved.
60
60
- ex_seq (from 0 to 1): Minimum sequence similarity % between a
61
- pair of homologous exons and their corresponding upstream and
61
+ pair of homologous exons and their corresponding upstream and
62
62
downstream exons.
63
- - ex_len (from 0 to 1): Maximum size difference between two homologous exons
63
+ - ex_len (from 0 to 1): Maximum size difference between two homologous exons
64
64
(as a fraction of either exon).
65
65
- prot_sim (from 0 to 1): Minimum sequence similarity over the entire pairwise alignment
66
66
for a pair of protein isoforms to be considered for comparison.
67
-
67
+
68
68
See online README at https://github.com/biocorecrg/ExOrthist for further information about the options.
69
69
"""
70
70
71
71
if (params. help) {
72
- log. info """ ExOrthist v0 .0.1.beta """
72
+ log. info """ ExOrthist v2 .0.0 """
73
73
log. info """ ExOrthist is a Nextflow-based pipeline to obtain groups of exon orthologous at all evolutionary timescales.\n """
74
74
exit 1
75
75
}
76
76
if (params. resume) exit 1 , " Are you making the classical --resume typo? Be careful!!!! ;)"
77
77
78
78
if ( ! workflow. resume ) {
79
79
println " Removing the output folder"
80
- new File (" ${ params.output} " ). delete()
80
+ new File (" ${ params.output} " ). delete()
81
81
}
82
82
83
83
clusterfile = file(params. cluster)
@@ -93,14 +93,14 @@ if ( !evodisfile.exists() ) exit 1, "Missing evodists file: ${evodisfile}!"
93
93
/*
94
94
* Validate input and print log file
95
95
*/
96
- // Prepare input channels
96
+ // Prepare input channels
97
97
Channel . fromPath(params. annotations). collect(). set{gtfs}
98
98
Channel . fromPath(params. genomes). collect(). set{fastas}
99
99
Channel . fromFilePairs(params. annotations, size : 1 ). flatten(). collate(2 ). map{[it[1 ]. getName(). toString(). split(it[0 ]. toString())[1 ]]}. unique(). flatten(). set{gtfs_suffix}
100
100
Channel . fromFilePairs(params. genomes, size : 1 ). flatten(). collate(2 ). map{[it[1 ]. getName(). toString(). split(it[0 ]. toString())[1 ]]}. unique(). flatten(). set{fastas_suffix}
101
101
long_dist = params. long_dist
102
102
medium_dist = params. medium_dist
103
- short_dist = params. short_dist
103
+ short_dist = params. short_dist
104
104
105
105
process check_input {
106
106
publishDir " ${ params.output} " , mode: ' copy'
@@ -176,7 +176,7 @@ if (params.extraexons) {
176
176
177
177
script:
178
178
def extrapars = " "
179
- if (extraexons. size()> 0 ) { extrapars = " -add_exons ${ extraexons} " }
179
+ if (extraexons. size()> 0 ) { extrapars = " -add_exons ${ extraexons} " }
180
180
"""
181
181
A1_generate_annotations.pl -GTF ${ annotation} -G ${ genome} -sp ${ genomeid} ${ extrapars}
182
182
"""
@@ -208,7 +208,7 @@ if (params.extraexons) {
208
208
// Copy the gene cluster file to output to use for the exint_plotter and compare_exon_sets modules
209
209
process split_clusters_by_species_pairs {
210
210
tag { clusterfile }
211
- publishDir " ${ params.output} /" , mode: ' copy' , pattern: " gene_cluster_file.gz"
211
+ publishDir " ${ params.output} /" , mode: ' copy' , pattern: " gene_cluster_file.gz"
212
212
213
213
input:
214
214
file(clusterfile)
@@ -293,7 +293,7 @@ process parse_IPA_prot_aln {
293
293
294
294
input:
295
295
file(blosumfile)
296
- set combid, file(sp1), file(sp2), file(cls_part_file), val(dist_range) from alignment_input
296
+ set combid, file(sp1), file(sp2), file(cls_part_file), val(dist_range) from alignment_input
297
297
298
298
output:
299
299
set val(" ${ sp1} -${ sp2} " ), path(" ${ sp1} -${ sp2} -*" ) into aligned_subclusters_4_splitting // 05/03/21
@@ -302,12 +302,12 @@ process parse_IPA_prot_aln {
302
302
script:
303
303
def prev_alignments = " "
304
304
if (params. prevaln) {prev_alignments = " ${ params.prevaln} " }
305
-
305
+
306
306
def cls_parts = " ${ cls_part_file} " . split(" _" )
307
307
if (dist_range == " long" )
308
308
dist_range_par = " ${ params.long_dist} " . split(" ," )
309
309
if (dist_range == " medium" )
310
- dist_range_par = " ${ params.medium_dist} " . split(" ," )
310
+ dist_range_par = " ${ params.medium_dist} " . split(" ," )
311
311
if (dist_range == " short" )
312
312
dist_range_par = " ${ params.short_dist} " . split(" ," )
313
313
@@ -332,10 +332,10 @@ process split_EX_pairs_to_realign {
332
332
333
333
input:
334
334
file(" *" ) from EXs_to_split_batches
335
-
335
+
336
336
output:
337
337
file(" *EXs_to_realign_part_*" ) into EXs_to_realign_batches
338
-
338
+
339
339
script:
340
340
"""
341
341
for file in \$ (ls *); do B2_split_EX_pairs_to_realign.py -i \$ {file} -n ${ params.alignmentnum} ; done
@@ -379,10 +379,10 @@ aligned_subclusters_4_splitting.groupTuple().join(realigned_exons_4_merge.groupT
379
379
process merge_PROT_EX_INT_aln_info {
380
380
tag { " ${ comp_id} " }
381
381
label ' incr_time_cpus'
382
-
382
+
383
383
stageInMode = ' copy'
384
384
// this matches all_PROT_aln_features.txt, all_EX_aln_features.txt, all_INT_aln_features.txt, Exint_Alignments.aln.gz
385
- publishDir " ${ params.output} " , mode: " copy" , pattern: " ${ comp_id} /all_*_aln_features.txt"
385
+ publishDir " ${ params.output} " , mode: " copy" , pattern: " ${ comp_id} /all_*_aln_features.txt"
386
386
publishDir " ${ params.output} " , mode: " copy" , pattern: " ${ comp_id} /EXINT_aln.gz"
387
387
388
388
input:
@@ -410,7 +410,7 @@ folder_jscores.join(anno_2_score_ex_int).map{
410
410
/*
411
411
* Score EX matches from aln info
412
412
*/
413
-
413
+
414
414
process score_EX_matches {
415
415
tag { " ${ comp_id} " }
416
416
label(' big_mem_retry' )
@@ -457,7 +457,7 @@ process filter_and_select_best_EX_matches_by_targetgene {
457
457
if (dist_range == " long" )
458
458
dist_range_par = " ${ params.long_dist} " . split(" ," )
459
459
if (dist_range == " medium" )
460
- dist_range_par = " ${ params.medium_dist} " . split(" ," )
460
+ dist_range_par = " ${ params.medium_dist} " . split(" ," )
461
461
if (dist_range == " short" )
462
462
dist_range_par = " ${ params.short_dist} " . split(" ," )
463
463
"""
@@ -595,7 +595,7 @@ process recluster_genes_by_species_pair {
595
595
596
596
script:
597
597
def species = " ${ combid} " . split(" -" )
598
- def orthopairs = file(" ${ params.orthopairs} " )
598
+ def orthopairs = file(" ${ params.orthopairs} " )
599
599
"""
600
600
D3.1_recluster_genes_by_species_pair.py -og ${ clusterfile} -op ${ orthopairs} --species1 ${ species[0]} --species2 ${ species[1]} -out reclustered_genes_${ combid} .tab
601
601
"""
@@ -629,26 +629,6 @@ process recluster_EXs_by_species_pair {
629
629
"""
630
630
}
631
631
632
-
633
- /*
634
- * functions
635
- */
636
-
637
- def getFolderName(sample) {
638
- folder_info = sample. toString(). tokenize(" /" )
639
- return folder_info[-2 ]
640
- }
641
-
642
- // make named pipe
643
- def unzipBash(filename) {
644
- def cmd = filename. toString()
645
- if (cmd[-3 .. -1 ] == " .gz" ) {
646
- cmd = " <(zcat ${ filename} )"
647
- }
648
- return cmd
649
- }
650
-
651
-
652
632
/*
653
633
* Mail notification
654
634
*/
0 commit comments