From c51746524be1f3c280b2eacb6755a29e6b2f5392 Mon Sep 17 00:00:00 2001 From: darrelln32 Date: Thu, 16 May 2024 10:10:28 -0400 Subject: [PATCH] Update dragen_csv_to_html.py changing index and index2 to create a demux html file for a run that was demuxed using index2 only --- scripts/dragen_csv_to_html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dragen_csv_to_html.py b/scripts/dragen_csv_to_html.py index 9c871b4..ee3c0d1 100644 --- a/scripts/dragen_csv_to_html.py +++ b/scripts/dragen_csv_to_html.py @@ -25,9 +25,9 @@ def build_lane_summary_html(demux_reports_dir, write_to_file): for i in range(1, lane_number + 1): df_name = "top_unknown_lane" + str(i) df_by_lanes[df_name] = top_unknown_barcodes_csv_covert.loc[top_unknown_barcodes_csv_covert["Lane"] == i] - if not df_by_lanes[df_name]["index2"].isnull().values.any(): - df_by_lanes[df_name]["index"] = df_by_lanes[df_name]["index"].str.cat(df_by_lanes[df_name]["index2"], sep="-") - df_by_lanes[df_name] = df_by_lanes[df_name].drop("index2", axis=1) + if not df_by_lanes[df_name]["index"].isnull().values.any(): + df_by_lanes[df_name]["index2"] = df_by_lanes[df_name]["index2"].str.cat(df_by_lanes[df_name]["index"], sep="-") + df_by_lanes[df_name] = df_by_lanes[df_name].drop("index", axis=1) # format two tables in the html with different column headers with open(write_to_file, 'w') as _file: _file.write("

Lane Summary

" + demux_stats_csv_convert.to_html(index = False, float_format = '{:,.0f}'.format) + "\n

Top Unknown Barcodes

\n" + "\n" )