From c1e6690a39a88e614cdb3d8a4abe61df810d667d Mon Sep 17 00:00:00 2001 From: pd321 <52960055+pd321@users.noreply.github.com> Date: Sun, 26 Apr 2020 16:51:24 +0530 Subject: [PATCH] Fixes #4 and #5 --- src/align.smk | 19 ++++++++++++------- src/se.smk | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/align.smk b/src/align.smk index 0b0b133..09ecfa9 100644 --- a/src/align.smk +++ b/src/align.smk @@ -6,9 +6,11 @@ rule trimgalore_se: params: quality = config['trimgalore']['quality'], stringency = config['trimgalore']['stringency'], - e = config['trimgalore']['e'] - # trimgalore does not recommend using more than 4 threads - threads: threads_mid if threads_mid < 4 else 4 + e = config['trimgalore']['e'], + #trimgalore does not recommend using more than 4 threads + threads_actual = threads_mid if threads_mid < 4 else 4 + # setting it to mid ensures not no many trimgalore jobs launched + threads: threads_mid shell: 'trim_galore ' '--quality {params.quality} ' @@ -16,7 +18,7 @@ rule trimgalore_se: '-e {params.e} ' '--gzip ' '--output_dir results/bam/ ' - '--cores {threads} ' + '--cores {params.threads_actual} ' '--basename {wildcards.sample} ' '--no_report_file ' '{input} 2>&1 | tee {log}' @@ -34,8 +36,11 @@ rule trimgalore_pe: params: quality = config['trimgalore']['quality'], stringency = config['trimgalore']['stringency'], - e = config['trimgalore']['e'] - threads: threads_mid if threads_mid < 4 else 4 + e = config['trimgalore']['e'], + #trimgalore does not recommend using more than 4 threads + threads_actual = threads_mid if threads_mid < 4 else 4 + # setting it to mid ensures not no many trimgalore jobs launched + threads: threads_mid shell: 'trim_galore ' '--quality {params.quality} ' @@ -43,7 +48,7 @@ rule trimgalore_pe: '-e {params.e} ' '--gzip ' '--output_dir results/bam/ ' - '--cores 4 ' + '--cores {params.threads_actual} ' '--basename {wildcards.sample} ' '--paired --no_report_file ' '{input[0]} {input[1]} 2>&1 | tee {log}' diff --git a/src/se.smk b/src/se.smk index ce8fccd..70481b3 100644 --- a/src/se.smk +++ b/src/se.smk @@ -5,7 +5,7 @@ rule rose_main: peaks = rules.blklist_filt.output output: enhancers_table = "results/se/{chip_sample}/{chip_sample}_peaks_AllEnhancers.table.txt", - enhancers_plot = "results/se/{chip_sample}/{chip_sample}_Plot_points.png" + enhancers_plot = "results/se/{chip_sample}/{chip_sample}_peaks_Plot_points.png" threads: threads_mid log: "logs/se/{chip_sample}_rose_main.log" params: