Commit f98571d5 authored by aknecht2's avatar aknecht2
Browse files

Updated param files and remove_duplicates yaml & generator to successfully...

Updated param files and remove_duplicates yaml & generator to successfully generator job.  Fixed a bug where workflow_job validation was crashing on non-string values.
parent a5da5bef
......@@ -84,6 +84,5 @@ class RemoveDuplicatesGenerator(ModuleGenerator):
prev_results = self.get_prev_results(run, result)
markers = {}
inputs = {"align.bam": prev_results[0].full_name}
additional_inputs = {}
results = self.create_results(run, result)
return markers, inputs, additional_inputs, self.get_outputs(results)
return markers, inputs, self.get_outputs(results)
remove_duplicates:
- samtools_filter_bam:
inputs:
- align.bam:
type: file
additional_inputs: null
align.bam:
param_name: aligned_bam
outputs:
- filtered.bam:
type: file
filtered.bam:
param_name: filtered_bam
- picard_clean_sam:
inputs:
- filtered.bam:
type: file
additional_inputs: null
filtered.bam:
param_name: input_bam
outputs:
- cleaned.bam:
type: file
cleaned.bam:
param_name: cleaned_bam
- picard_sort_sam:
inputs:
- cleaned.bam:
type: file
additional_inputs: null
cleaned.bam:
param_name: input_bam
outputs:
- sorted.bam:
type: file
sorted.bam:
param_name: sorted_bam
- picard_mark_duplicates:
inputs:
- sorted.bam:
type: file
additional_inputs: null
sorted.bam:
param_name: input_bam
outputs:
- no_dups.bam:
type: file
- quality.qc:
type: file
no_dups.bam:
param_name: dups_marked
quality.qc:
param_name: quality
- bedtools_bam_to_bed:
inputs:
- no_dups.bam:
type: file
additional_inputs: null
no_dups.bam:
param_name: input_bam
outputs:
- no_dups.bed:
type: stdout
no_dups.bed:
param_name: output_bed
- chr_locus_convert:
inputs:
- no_dups.bed:
type: file
additional_inputs: null
no_dups.bed:
param_name: aligned_bed
outputs:
- no_dups_chr.bed:
type: file
final_result: true
no_dups_chr.bed:
param_name: chr_bed
bedtools_bam_to_bed:
inputs:
- name: input_bam
input_bam:
type: file
file_type: bam
additional_inputs: null
outputs:
- name: output_bed
output_bed:
type: stdout
file_type: bed
command: bedtools
......@@ -20,7 +19,7 @@ bedtools_bam_to_bed:
changeable: false
required: true
has_value: true
default: $inputs.0
default: $input_bam
walltime: 60
memory: 2000
cores: 1
......
chr_locus_convert:
inputs:
- name: aligned_bed
aligned_bed:
type: file
file_type: bed
additional_inputs: null
outputs:
- name: chr_bed
chr_bed:
type: file
file_type: bed
command: chip-job-chr-convert
......@@ -15,13 +14,13 @@ chr_locus_convert:
changeable: false
required: true
has_value: true
default: $inputs.0
default: $aligned_bed
- "-o":
type: file
changeable: false
required: true
has_value: true
default: $outputs.0
default: $chr_bed
- "-c":
type: string
changeable: false
......
picard_clean_sam:
inputs:
- name: input_bam
input_bam:
type: file
file_type: bam
additional_inputs: null
outputs:
- name: cleaned_bam
cleaned_bam:
type: file
file_type: bam
command: picard
......@@ -20,13 +19,13 @@ picard_clean_sam:
changeable: false
required: true
has_value: true
default: $inputs.0
default: $input_bam
- "OUTPUT=":
type: file
changeable: false
required: true
has_value: true
default: $outputs.0
default: $cleaned_bam
walltime: 60
memory: 4000
cores: 1
......
picard_mark_duplicates:
inputs:
- name: aligned_bam
input_bam:
type: file
file_type: bam
additional_inputs: null
outputs:
- name: dups_marked
dups_marked:
type: file
file_type: bam
- name: quaality
quality:
type: file
file_type: qc
command: picard
......@@ -24,19 +22,19 @@ picard_mark_duplicates:
changeable: false
required: true
has_value: true
default: $inputs.0
default: $input_bam
- "OUTPUT=":
type: file
changeable: false
required: true
has_value: true
default: $outputs.0
default: $dups_marked
- "METRICS_FILE=":
type: file
changeable: false
required: true
has_value: true
default: $outputs.1
default: $quality
- "VALIDATION_STRINGENCY=":
type: string
changeable: true
......
picard_sort_sam:
inputs:
- name: filtered_bam
input_bam:
type: file
file_type: bam
additional_inputs: null
outputs:
- name: sorted_bam
sorted_bam:
type: file
file_type: bam
command: picard
......@@ -20,13 +19,13 @@ picard_sort_sam:
changeable: false
required: true
has_value: true
default: $inputs.0
default: $input_bam
- "OUTPUT=":
type: file
changeable: false
required: true
has_value: true
default: $outputs.0
default: $sorted_bam
- "SORT_ORDER=":
type: string
changeable: true
......
samtools_filter_bam:
inputs:
- name: aligned_bam
aligned_bam:
type: file
file_type: bam
additional_inputs: null
outputs:
- name: filtered_bam
filtered_bam:
type: file
file_type: bam
command: samtools
......@@ -37,8 +36,8 @@ samtools_filter_bam:
changeable: false
required: true
has_value: true
default: $outputs.0
- "$inputs.0":
default: $filtered_bam
- "$aligned_bam":
type: file
changeable: false
required: true
......
......@@ -259,8 +259,8 @@ class WorkflowJob(object):
# references one of the keys of the inputs / outputs
elif not arg_value.startswith("$"):
return (False, "[Error parsing job %s]: Argument '%s' has value '%s'. File references must start with a '$'." % (self, arg_name, arg_value))
elif arg_value.startswith("$"):
if not any([arg_value[1:] == ref for ref in (self.valid_inputs + self.valid_outputs)]):
elif isinstance(arg_value, str) and arg_value.startswith("$"):
if not any([str(arg_value)[1:] == ref for ref in (self.valid_inputs + self.valid_outputs)]):
return (False, "[Error parsing job %s]: Argument '%s' has reference '%s'. No such input / output exists." % (self, arg_name, arg_value))
return (True, None)
......@@ -510,7 +510,7 @@ class WorkflowJob(object):
"""
arg_value = self._get_arg_value(arg_name, arg_info)
add_value = arg_value
if arg_info["type"] != "numeric" and arg_value.startswith("$"):
if isinstance(arg_value, str) and arg_value.startswith("$"):
arg_value = arg_value[1:]
if arg_info["type"] == "rawfile":
add_value = self.raw_files[os.path.basename(arg_value)]["file"]
......
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