Commit f1fcb137 authored by Adam Caprez's avatar Adam Caprez
Browse files

Changes to handle genome files containing `.` chars

parent 689f928d
......@@ -164,13 +164,15 @@ class Workflow(object):
if assembly in self.run_data["genomes"][run["align"]]:
base_file = self.run_data["genomes"][run["align"]][assembly]
if os.path.isfile(base_file):
base_file_name = gen_prefix + "." + os.path.basename(base_file).split(".", 1)[1]
(base_file_prefix,base_file_ext) = os.path.splitext(os.path.basename(base_file))
base_file_ext = base_file_ext[1:]
base_file_name = gen_prefix + "." + base_file_ext
f = File(base_file_name)
f.addPFN(PFN(base_file, "local"))
self.files[base_file_name] = f
self.dax.addFile(f)
if base_file.split(".", 1)[1] in chipathlon.conf.genomes[run["align"]]["base_file"]:
prefix = base_file.split(".", 1)[0]
if base_file_ext in chipathlon.conf.genomes[run["align"]]["base_file"]:
prefix = os.path.splitext(base_file)[0]
missing = []
for ext in chipathlon.conf.genomes[run["align"]]["additional_files"]:
if not os.path.isfile(prefix + "." + ext) and not os.path.isfile(base_file + "." + ext):
......@@ -264,7 +266,7 @@ class Workflow(object):
additional_files = {}
markers["tool"] = run["align"]
gen_prefix = "genome_%s_grch38p6" % (run["align"],)
input_files["ref_genome"] = "%s.%s" % (gen_prefix, os.path.basename(self.run_data["genomes"][run["align"]]["grch38p6"]).split(".")[1])
input_files["ref_genome"] = "%s.%s" % (gen_prefix, os.path.splitext(os.path.basename(self.run_data["genomes"][run["align"]]["grch38p6"]))[1][1:])
for ext in chipathlon.conf.genomes[run["align"]]["additional_files"]:
additional_files["ref_genome." + ext] = "%s.%s" % (gen_prefix, ext)
for pair in run["input_sets"]:
......
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