Skip to content

Commit 5ecca74

Browse files
committed
starting playing
1 parent e78810a commit 5ecca74

File tree

3 files changed

+25
-41
lines changed

3 files changed

+25
-41
lines changed

TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Moving modules into modules folder
2+
- Adding nextflow_schema.json
3+
- Review container

main.nf

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ params.resume = false
3333
log.info """
3434
3535
╔╦╗┬ ┬┌─┐ ╔═╗─┐ ┬╔═╗┬─┐┌┬┐┬ ┬┬┌─┐┌┬┐
36-
║ ├─┤├┤ ║╣ ┌┴┬┘║ ║├┬┘ │ ├─┤│└─┐ │
37-
╩ ┴ ┴└─┘ ╚═╝┴ └─╚═╝┴└─ ┴ ┴ ┴┴└─┘ ┴
36+
║ ├─┤├┤ ║╣ ┌┴┬┘║ ║├┬┘ │ ├─┤│└─┐ │
37+
╩ ┴ ┴└─┘ ╚═╝┴ └─╚═╝┴└─ ┴ ┴ ┴┴└─┘ ┴
3838
3939
==============================================================================
4040
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_
5858
Only exon matches respecting all cut-offs are considered homologous.
5959
- int_num (0,1,2): Number of surrounding intron positions required to be conserved.
6060
- 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
6262
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
6464
(as a fraction of either exon).
6565
- prot_sim (from 0 to 1): Minimum sequence similarity over the entire pairwise alignment
6666
for a pair of protein isoforms to be considered for comparison.
67-
67+
6868
See online README at https://github.com/biocorecrg/ExOrthist for further information about the options.
6969
"""
7070

7171
if (params.help) {
72-
log.info """ExOrthist v0.0.1.beta"""
72+
log.info """ExOrthist v2.0.0"""
7373
log.info """ExOrthist is a Nextflow-based pipeline to obtain groups of exon orthologous at all evolutionary timescales.\n"""
7474
exit 1
7575
}
7676
if (params.resume) exit 1, "Are you making the classical --resume typo? Be careful!!!! ;)"
7777

7878
if( !workflow.resume ) {
7979
println "Removing the output folder"
80-
new File("${params.output}").delete()
80+
new File("${params.output}").delete()
8181
}
8282

8383
clusterfile = file(params.cluster)
@@ -93,14 +93,14 @@ if ( !evodisfile.exists() ) exit 1, "Missing evodists file: ${evodisfile}!"
9393
/*
9494
* Validate input and print log file
9595
*/
96-
//Prepare input channels
96+
//Prepare input channels
9797
Channel.fromPath(params.annotations).collect().set{gtfs}
9898
Channel.fromPath(params.genomes).collect().set{fastas}
9999
Channel.fromFilePairs(params.annotations, size: 1).flatten().collate(2).map{[it[1].getName().toString().split(it[0].toString())[1]]}.unique().flatten().set{gtfs_suffix}
100100
Channel.fromFilePairs(params.genomes, size: 1).flatten().collate(2).map{[it[1].getName().toString().split(it[0].toString())[1]]}.unique().flatten().set{fastas_suffix}
101101
long_dist = params.long_dist
102102
medium_dist = params.medium_dist
103-
short_dist = params.short_dist
103+
short_dist = params.short_dist
104104

105105
process check_input {
106106
publishDir "${params.output}", mode: 'copy'
@@ -176,7 +176,7 @@ if (params.extraexons) {
176176

177177
script:
178178
def extrapars = ""
179-
if (extraexons.size()>0) { extrapars = " -add_exons ${extraexons}" }
179+
if (extraexons.size()>0) { extrapars = " -add_exons ${extraexons}" }
180180
"""
181181
A1_generate_annotations.pl -GTF ${annotation} -G ${genome} -sp ${genomeid} ${extrapars}
182182
"""
@@ -208,7 +208,7 @@ if (params.extraexons) {
208208
//Copy the gene cluster file to output to use for the exint_plotter and compare_exon_sets modules
209209
process split_clusters_by_species_pairs {
210210
tag { clusterfile }
211-
publishDir "${params.output}/", mode: 'copy', pattern: "gene_cluster_file.gz"
211+
publishDir "${params.output}/", mode: 'copy', pattern: "gene_cluster_file.gz"
212212

213213
input:
214214
file(clusterfile)
@@ -293,7 +293,7 @@ process parse_IPA_prot_aln {
293293

294294
input:
295295
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
297297

298298
output:
299299
set val("${sp1}-${sp2}"), path("${sp1}-${sp2}-*") into aligned_subclusters_4_splitting //05/03/21
@@ -302,12 +302,12 @@ process parse_IPA_prot_aln {
302302
script:
303303
def prev_alignments = ""
304304
if (params.prevaln) {prev_alignments = "${params.prevaln}"}
305-
305+
306306
def cls_parts = "${cls_part_file}".split("_")
307307
if (dist_range == "long")
308308
dist_range_par = "${params.long_dist}".split(",")
309309
if (dist_range == "medium")
310-
dist_range_par = "${params.medium_dist}".split(",")
310+
dist_range_par = "${params.medium_dist}".split(",")
311311
if (dist_range == "short")
312312
dist_range_par = "${params.short_dist}".split(",")
313313

@@ -332,10 +332,10 @@ process split_EX_pairs_to_realign {
332332

333333
input:
334334
file("*") from EXs_to_split_batches
335-
335+
336336
output:
337337
file("*EXs_to_realign_part_*") into EXs_to_realign_batches
338-
338+
339339
script:
340340
"""
341341
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
379379
process merge_PROT_EX_INT_aln_info {
380380
tag { "${comp_id}" }
381381
label 'incr_time_cpus'
382-
382+
383383
stageInMode = 'copy'
384384
//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"
386386
publishDir "${params.output}", mode: "copy", pattern: "${comp_id}/EXINT_aln.gz"
387387

388388
input:
@@ -410,7 +410,7 @@ folder_jscores.join(anno_2_score_ex_int).map{
410410
/*
411411
* Score EX matches from aln info
412412
*/
413-
413+
414414
process score_EX_matches {
415415
tag { "${comp_id}" }
416416
label('big_mem_retry')
@@ -457,7 +457,7 @@ process filter_and_select_best_EX_matches_by_targetgene {
457457
if (dist_range == "long")
458458
dist_range_par = "${params.long_dist}".split(",")
459459
if (dist_range == "medium")
460-
dist_range_par = "${params.medium_dist}".split(",")
460+
dist_range_par = "${params.medium_dist}".split(",")
461461
if (dist_range == "short")
462462
dist_range_par = "${params.short_dist}".split(",")
463463
"""
@@ -595,7 +595,7 @@ process recluster_genes_by_species_pair {
595595

596596
script:
597597
def species = "${combid}".split("-")
598-
def orthopairs = file("${params.orthopairs}")
598+
def orthopairs = file("${params.orthopairs}")
599599
"""
600600
D3.1_recluster_genes_by_species_pair.py -og ${clusterfile} -op ${orthopairs} --species1 ${species[0]} --species2 ${species[1]} -out reclustered_genes_${combid}.tab
601601
"""
@@ -629,26 +629,6 @@ process recluster_EXs_by_species_pair {
629629
"""
630630
}
631631

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-
652632
/*
653633
* Mail notification
654634
*/

modules/local/exorthist/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Local modules will be migrated here

0 commit comments

Comments
 (0)