Skip to content

Commit

Permalink
altered write_to_csv function to accomodate syntaxError f-string due …
Browse files Browse the repository at this point in the history
…to double quotes within f string
  • Loading branch information
RAHenriksen committed Oct 24, 2024
1 parent 7c9ca8d commit 5dc92b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parse_report_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def write_to_csv(csv_data, csv_outfile):
fields = [
# header: "Name;cdtA/B;tcdA;tcdB;tcdClength;117del;A117T;TRST;TR6;TR10;ST;STalleles;WGS;tcdA:tcdB:tcdC:cdtA:cdtB"
csv_data["Name"],
f"{csv_data["cdtA"]}/{csv_data["cdtB"]}",
f"{csv_data['cdtA']}/{csv_data['cdtB']}",
csv_data["tcdA"],
csv_data["tcdB"],
csv_data["tcdClength"],
Expand All @@ -204,7 +204,7 @@ def write_to_csv(csv_data, csv_outfile):
csv_data["TR10"],
csv_data["ST"],
csv_data["WGS"],
f"{csv_data["cov_info"]["tcdA"]}:{csv_data["cov_info"]["tcdB"]}:{csv_data["cov_info"]["tcdC"]}:{csv_data["cov_info"]["cdtA"]}:{csv_data["cov_info"]["cdtB"]}"
f"{csv_data['cov_info']['tcdA']}:{csv_data['cov_info']['tcdB']}:{csv_data['cov_info']['tcdC']}:{csv_data['cov_info']['cdtA']}:{csv_data['cov_info']['cdtB']}"
]
print(";".join(fields), file=csvout)

Expand Down

0 comments on commit 5dc92b2

Please sign in to comment.