Skip to content

Commit

Permalink
Fixing issue on mac with compare pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
sbastkowski committed Apr 28, 2024
1 parent 509e6e9 commit 02c2df9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quatradis/pipelines/compare.smk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import shutil
import sys

input_files=[]
norm_files=[]
Expand Down Expand Up @@ -33,6 +34,8 @@ if not shutil.which('gzcat'):
else:
raise Error("Couldn't find gzcat or zcat on your system. Please install and try again.")

ZCAT_JOIN=' <' if sys.platform == "darwin" else ''

def make_no_normalise_cmd():
cmds = []
for i in range(len(input_files)):
Expand Down Expand Up @@ -156,9 +159,9 @@ rule insertion_site_comparison:
p_value="--pvalue=" + config["p_value"],
q_value="--qvalue=" + config["q_value"],
window_size="--window_size=" + config["window_size"],
zcat=ZCAT_CMD
zcat=ZCAT_CMD + ZCAT_JOIN
message: "Calculating logfc for {output}"
shell: "SEQLENGTH=$({params.zcat} {params.combined} | wc -l); tradis compare insertion_sites {input.embl} {params.tt} {params.output_dir} --genome_length=${{SEQLENGTH}} {params.span_gaps} {params.window_size} {params.p_value} {params.q_value} {params.minimum_block} {params.minimum_logfc} {params.minimum_logcpm} {params.minimum_proportion_insertions} --verbose --controls {input.controls} --conditions {input.conditions} > {log} 2>&1"
shell: "SEQLENGTH=$({params.zcat} {params.combined} | wc -l | awk '{{$1=$1}};1'); tradis compare insertion_sites {input.embl} {params.tt} {params.output_dir} --genome_length=${{SEQLENGTH}} {params.span_gaps} {params.window_size} {params.p_value} {params.q_value} {params.minimum_block} {params.minimum_logfc} {params.minimum_logcpm} {params.minimum_proportion_insertions} --verbose --controls {input.controls} --conditions {input.conditions} > {log} 2>&1"


rule gene_stats:
Expand Down

0 comments on commit 02c2df9

Please sign in to comment.