Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjunnebo committed Oct 15, 2024
1 parent 326375f commit fd54a12
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions taca/element/Element_Runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ def to_doc_obj(self):
demux_command_file = os.path.join(self.run_dir, ".bases2fastq_command")
if os.path.exists(demux_command_file):
with open(demux_command_file) as command_file:
demux_command = command_file.readlines()[0]
demux_commands = command_file.readlines()
else:
demux_command = None
demux_commands = None
demux_version_file = os.path.join(
self.run_dir, "Demultiplexing_0", "RunStats.json"
)
Expand All @@ -286,7 +286,7 @@ def to_doc_obj(self):
software_info = {
"Version": demux_version,
"bin": self.CONFIG.get("element_analysis").get("bases2fastq"),
"options": demux_command,
"options": demux_commands,
}

doc_obj = {
Expand Down Expand Up @@ -580,9 +580,10 @@ def make_demux_manifests(
raise AssertionError("Both I1 and I2 appear to contain UMIs.")

# Unpack settings from LIMS manifest
for kv in settings.split(" "):
k, v = kv.split(":")
settings_kvs[k] = v
if settings:
for kv in settings.split(" "):
k, v = kv.split(":")
settings_kvs[k] = v

settings_section = "\n".join(
[
Expand Down Expand Up @@ -641,7 +642,7 @@ def generate_demux_command(self, run_manifest, demux_dir):
+ " --force-index-orientation"
)
with open(
os.path.join(self.run_dir, ".bases2fastq_command"), "w"
os.path.join(self.run_dir, ".bases2fastq_command"), "a"
) as command_file:
command_file.write(command)
return command
Expand Down

0 comments on commit fd54a12

Please sign in to comment.