Skip to content

Commit

Permalink
fix single index bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CuijieLu committed Aug 30, 2023
1 parent 6e5f70c commit dabb385
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/dragen_csv_to_html.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from cmath import nan
import pandas
import sys
from collections import OrderedDict
Expand All @@ -24,7 +25,8 @@ 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]
df_by_lanes[df_name]["index"] = df_by_lanes[df_name]["index"].str.cat(df_by_lanes[df_name]["index2"], sep="-")
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)
# format two tables in the html with different column headers
with open(write_to_file, 'w') as _file:
Expand Down

0 comments on commit dabb385

Please sign in to comment.