Commit f59d8b25 authored by aknecht2's avatar aknecht2
Browse files

Adjusted peak calling methods, added peak_call generation to workflow.

parent 76350ea7
......@@ -6,8 +6,6 @@ peak_call:
type: file
- control.bam:
type: file
- dir:
type: argument
additional_inputs: null
outputs:
- results.narrowPeak:
......
......@@ -4,8 +4,6 @@ r_spp_nodups:
type: file
- bam:
type: file
- dir:
type: argument
outputs:
- bed:
type: file
......@@ -34,7 +32,7 @@ r_spp_nodups:
changeable: false
required: true
has_value: true
default: $inputs.2
default: .
- "-speak":
changeable: true
required: false
......
......@@ -324,6 +324,28 @@ class Workflow(object):
self.modules["remove_duplicates"].add_jobs(self.dax, self.jobs, self.files, prefix, {}, {}, {})
return
def _add_peak_calling(self):
markers = {}
for run in self.run_data["runs"]:
inputs = {}
markers["tool"] = run["peak"]
for pair in run["input_sets"]:
# Now we use individual file_tuples to extract the correct
# prefix and add in as input_files
# remove_duplicates returns prefix_no_dups.bam
# REMEMBER: experiment is always first
final_prefix = ""
for i, file_tuple in enumerate(pair):
prefix = run["prefix"][i]
inputs["exp.bam"] = prefix + "_no_dups.bam"
final_prefix += prefix
if run["peak"] == "spp":
pass
elif run["peak"] == "macs2":
inputs["prefix"] = self.modules["peak_call"]._get_full_prefix(final_prefix, markers)
self.modules["peak_call"].add_jobs(self.dax, self.jobs, self.files, final_prefix, markers, inputs, {})
return
def _create_setup(self):
"""
Creates the base structure for job submission. Everything is contained
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment