Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
cmkobel committed Jun 20, 2024
1 parent 5322c28 commit 3805196
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions dynamic_report/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ rule dynamic_report:
rm -r .writable_template_copy # Problem is that this file is only removed if pipeline finishes. Should it be removed by onerror?
# End script
test -f "{params.end_script}" && echo "running end script" && . {params.end_script} {batch_title} {output_directory}/report_{batch_title}.html
test -f "{params.end_script}" && echo "running end script" && . {params.end_script} {batch_title} {output_directory}/report_{batch_title}.html || true
# Print the ass. Thanks to George Taiaroa.
echo "{params.text_box}"
cat "{base_variable}/resources/ass.txt"
"""


Expand All @@ -109,9 +106,8 @@ def format_sections():
"""
file = f"{output_directory}/tables/{batch_title}__sections.tsv"
if os.path.exists(file):
df_sections = pd.read_csv(file, sep = "\t")
df_sections = df_sections.rename(columns={"render": "render_emoji"})
df_sections['render'] = [i.encode('ascii',errors='ignore').decode() for i in df_sections['render_emoji']]
df_sections = pd.read_csv(file, sep = "\t").rename(columns={"render": "render_emoji"})
df_sections['render'] = [i.encode('ascii', errors='ignore').decode() for i in df_sections['render_emoji']]
return df_sections[["section", "n / expected", "render"]].to_string(index = False)
else: # If something messes up the report so bad that this file is not written.
return f"(could not read {file})"
Expand Down

0 comments on commit 3805196

Please sign in to comment.