Commit 2a009c0c authored by aknecht2's avatar aknecht2
Browse files

Added sai to file_extensions. Typo fixes for workflow_job & module.

parent da27e171
......@@ -14,6 +14,7 @@ job_scripts = "jobs/scripts/"
file_extensions = {
"genome_index": ["fa", "fna"],
"fastq": ["fastq", "fastq.gz"],
"sai": ["sai"],
"sam": ["sam"],
"bam": ["bam"],
"bed": ["bed", "narrowPeak", "broadPeak"],
......
......@@ -86,8 +86,8 @@ class WorkflowJob(object):
for ftype, flist in zip(["inputs", "additional_inputs", "outputs"], [input_files, additional_inputs, output_files]):
if (len(flist) == len(self.base[self.jobname][ftype])):
for i, f in enumerate(flist):
if not f["name"].split(".")[1] in chipathlon.conf.file_extensions[self.base[self.jobname][ftype][i]]:
self.err += "File '%s' is not of type '%s'. Should match one of '%s' extensions.\n" % (f, self.base[self.jobname][ftype][i], chipathlon.conf.file_extensions[self.base[self.jobname]["inputs"][i]])
if not f["name"].split(".")[-1] in chipathlon.conf.file_extensions[self.base[self.jobname][ftype][i]]:
self.err += "File '%s' is not of type '%s'. Should match one of '%s' extensions.\n" % (f["name"], self.base[self.jobname][ftype][i], chipathlon.conf.file_extensions[self.base[self.jobname][ftype][i]])
valid_files = False
else:
self.err += "Number of file_names '%s' must match number of expected %s files.\n" % (file_names, ftype[:-1])
......
......@@ -162,4 +162,4 @@ class WorkflowModule(object):
return (valid, msg, data)
def _get_full_name(self, prefix, markers, fname):
return "%s_%s_%s" % (prefix, "_".join([markers[x] for x in self.order]), fname)
return "%s_%s_%s" % (prefix, "_".join([x + "_" + markers[x] for x in self.order]), fname)
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