From f81488ec89666a866eedba604482b77a0bb03f83 Mon Sep 17 00:00:00 2001
From: aknecht2 <aknecht2@unl.edu>
Date: Tue, 7 Mar 2017 10:22:38 -0600
Subject: [PATCH] Fixed issues with ccat output files.

---
 chipathlon/jobs/modules/peak_call.yaml | 17 +++++++++++------
 chipathlon/peak_call_generator.py      |  2 +-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/chipathlon/jobs/modules/peak_call.yaml b/chipathlon/jobs/modules/peak_call.yaml
index 97d2bd2..31b68f6 100644
--- a/chipathlon/jobs/modules/peak_call.yaml
+++ b/chipathlon/jobs/modules/peak_call.yaml
@@ -49,25 +49,30 @@ peak_call:
               type: string
         additional_inputs: null
         outputs:
-          - ccat.significant.peak:
+          - significant.peak:
               type: file
-          - ccat.significant.region:
+              prefix_join: "."
+          - significant.region:
               type: file
-          - ccat.top100000.peak:
+              prefix_join: "."
+          - top100000.peak:
               type: file
-          - ccat.log:
+              prefix_join: "."
+          - log:
               type: stdout
+              prefix_join: "."
     - ccat_format_bed:
         inputs:
-          - ccat.significant.region:
+          - significant.region:
               type: file
         additional_inputs: null
         outputs:
           - region_sorted.bed:
               type: file
+              save_result: true
     - ccat_format_bed:
         inputs:
-          - ccat.significant.peak:
+          - significant.peak:
               type: file
         additional_inputs: null
         outputs:
diff --git a/chipathlon/peak_call_generator.py b/chipathlon/peak_call_generator.py
index a305229..6b6b0d7 100644
--- a/chipathlon/peak_call_generator.py
+++ b/chipathlon/peak_call_generator.py
@@ -70,7 +70,7 @@ class PeakCallGenerator(ModuleGenerator):
             # The prefix mod is because ccat files have double extensions,
             # and we can't control the names of the output files directly,
             # only with the prefix.
-            "prefix": "_".join(result.prefix.split("_")[:-1])
+            "prefix": result.prefix
         }
         additional_inputs = {}
         return (markers, inputs, additional_inputs)
-- 
GitLab