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()