From 46966d1460779721ebd73d8b3d43dc5d1cb066d5 Mon Sep 17 00:00:00 2001 From: Danny Park Date: Thu, 29 Jan 2015 16:18:02 -0500 Subject: [PATCH] fix some report generation and consolidation --- pipes/rules/reports.rules | 2 +- reports.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pipes/rules/reports.rules b/pipes/rules/reports.rules index 9d2fc4b33..d4dd4dca3 100644 --- a/pipes/rules/reports.rules +++ b/pipes/rules/reports.rules @@ -63,5 +63,5 @@ rule consolidate_spike_count: sample=read_samples_file(config["samples_per_run"])) output: '{dir}/summary.spike_count.txt' params: logid="all" - shell: "{config[binDir]}/reports.py consolidate_spike_count {dir}/spike_count {output}" + shell: "{config[binDir]}/reports.py consolidate_spike_count {wildcards.dir}/spike_count {output}" diff --git a/reports.py b/reports.py index 0a04d8978..77129e525 100755 --- a/reports.py +++ b/reports.py @@ -203,6 +203,7 @@ def consolidate_spike_count(inDir, outFile): '''Consolidate multiple spike count reports into one.''' with open(outFile, 'wt') as outf: for fn in os.listdir(inDir): + fn = os.path.join(inDir, fn) s = os.path.basename(fn) if not s.endswith('.spike_count.txt'): raise Exception()