From 3c284c13276fe7dff67054eb8222d9558484031b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Wiegandt?= Date: Fri, 28 Sep 2018 07:33:17 -0400 Subject: [PATCH 1/2] aaa --- TOuCAN.nf | 4 ++-- nextflow.config | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TOuCAN.nf b/TOuCAN.nf index d03061b..8ddad8e 100644 --- a/TOuCAN.nf +++ b/TOuCAN.nf @@ -408,8 +408,8 @@ process create_restriction_maps_for_T2C { """ } -res_map.concat(restriction_maps).into {final_res_map_for_check; final_res_map; final_res_map_for_intersection; res_map_for_ifm} - +res_map.concat(restriction_maps).into {final_res_map_for_check; final_res_map; final_res_map_for_intersection; res_map_for_ifm; test} +test.filter{ it.simpleName == "restriction_fragments_${params.enzyme_a_name}"}.println() process check_restriction_maps { diff --git a/nextflow.config b/nextflow.config index d7960c4..02a8b2c 100644 --- a/nextflow.config +++ b/nextflow.config @@ -10,7 +10,7 @@ env { path_genome = "/mnt/workspace1/rene.wiegandt/NextFlow/script/THCPipe/index_bwa/GRCm38.p5.genome_whitelist.fa" // Path to full genome in fasta format + basis name of index [e.g. GRCm38.p5.genome_whitelist.fa] path_gtf = "/mnt/agnerds/Rene.Wiegandt/fromMario/gencode.vM15.annotation.gtf" - path_T2C_restriction_maps = "${path_working}/01_restriction_maps" //If empty restriction maps are generated [typically: path_working + /01_restriction_maps/]. If empty files are generated + path_T2C_restriction_maps = ""//"${path_working}/01_restriction_maps" //If empty restriction maps are generated [typically: path_working + /01_restriction_maps/]. If empty files are generated } @@ -42,7 +42,7 @@ params { //Parameter for HiC matrix //-------------------------------------------- hicBuildMatrix_threads = 16 - bwa_HiC_options = "-t 4" // bwa mem + bwa_HiC_options = "-t 16" // bwa mem threads_bowtie2 = 12 inputBufferSize = 400000 From 04f9cdeb24b84492e39a33731e35f286ad9884bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Wiegandt?= Date: Mon, 15 Oct 2018 08:40:00 -0400 Subject: [PATCH 2/2] Bugfix: restriction maps --- TOuCAN.nf | 21 +++++++++++---------- nextflow.config | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/TOuCAN.nf b/TOuCAN.nf index 2fb553d..45055a1 100644 --- a/TOuCAN.nf +++ b/TOuCAN.nf @@ -225,7 +225,7 @@ if(params.mode == "multiplot"){ if (params.mode != "plot"){ - if ( "${path_T2C_restriction_maps}" != ""){ + if ( "${path_T2C_restriction_maps}" != "none"){ if (! file ("${path_T2C_restriction_maps}/restriction_targets.bed").exists()){ println("Warning: restriction_target.bed does not exists on given path (path_T2C_restriction_maps in configuration file) -> starting to create restriction maps.") create_res_map = true @@ -371,7 +371,11 @@ process create_restriction_maps_for_T2C { publishDir "${outpath}/${params.pn}_restriction_maps/", mode: 'copy' output: - file ("*.bed") into restriction_maps + file ("restriction_sites_${params.enzyme_a_name}.bed") into restriction_maps_1 + file ("restriction_fragments_${params.enzyme_a_name}.bed") into restriction_maps_2 + file ("restriction_sites.bed") into restriction_maps_3 + file ("restriction_fragments.bed") into restriction_maps_4 + file ("restriction_targets.bed") into restriction_maps_5 when: params.mode == 'T2C' || params.mode == 'multiplot' @@ -407,9 +411,9 @@ process create_restriction_maps_for_T2C { grep ${params.enzyme_a_sequence} restriction_fragments.bed > restriction_targets.bed """ } +restriction_maps = restriction_maps_1.concat(restriction_maps_2, restriction_maps_3, restriction_maps_4, restriction_maps_5) -res_map.concat(restriction_maps).into {final_res_map_for_check; final_res_map; final_res_map_for_intersection; res_map_for_ifm; test} -test.filter{ it.simpleName == "restriction_fragments_${params.enzyme_a_name}"}.println() +res_map.concat(restriction_maps).into {final_res_map_for_check; final_res_map; final_res_map_for_intersection; res_map_for_ifm} process check_restriction_maps { @@ -640,7 +644,6 @@ process samtools_sort { bam_f.concat(bamfiles).into {finalbam; bamfiles_for_flagstats; workaround} - // T2C Step 6 process samtools_flagstat { @@ -692,7 +695,7 @@ process index_bamfiles { """ } -bam_bai_files_final = bam_bai_files.combine(workaround, by: 0) +bam_bai_files.combine(workaround, by: 0).set {bam_bai_files_final} /* * T2C Step 8 @@ -1450,11 +1453,9 @@ process plot_TAD_graph { } -multiplot_bed_1.concat(multiplot_bed_2).into {multiplot_bed_merged; testa} +multiplot_bed_1.concat(multiplot_bed_2).set {multiplot_bed_merged} +multiplot_TAD.join(multiplot_bed_merged).set {multi} -multiplot_TAD.join(multiplot_bed_merged).into {multi; testb} -testa.println() -testb.println() process multiplot { diff --git a/nextflow.config b/nextflow.config index 5d76304..0eb3df6 100644 --- a/nextflow.config +++ b/nextflow.config @@ -5,12 +5,12 @@ env { path_R = "/mnt/software/x86_64/packages/r/3.4.4-stretch-local/bin" //Path to R path_bin = "/mnt/workspace1/rene.wiegandt/NextFlow/script/TOuCAN" // Path to parent folder containing bin folder with T2C analysis scripts. - path_working = "/mnt/workspace1/rene.wiegandt/NextFlow/script/TOuCAN" // Working directory. + path_working = "/mnt/workspace1/rene.wiegandt/NextFlow/script/TOuCAN" // Working directory. path_genome = "/mnt/workspace1/rene.wiegandt/NextFlow/script/THCPipe/index_bwa/GRCm38.p5.genome_whitelist.fa" // Path to full genome in fasta format + basis name of index [e.g. GRCm38.p5.genome_whitelist.fa] path_gtf = "/mnt/agnerds/Rene.Wiegandt/fromMario/gencode.vM15.annotation.gtf" - path_T2C_restriction_maps = ""//"${path_working}/01_restriction_maps" //If empty restriction maps are generated [typically: path_working + /01_restriction_maps/]. If empty files are generated + path_T2C_restriction_maps = "none"//"${path_working}/01_restriction_maps" //If "none" restriction maps are generated [typically: path_working + /01_restriction_maps/]. If empty files are generated }