Skip to content

Commit

Permalink
Merge pull request #457 from jeromekelleher/handle-empty-day-bug
Browse files Browse the repository at this point in the history
Fix bug in samples processed output
  • Loading branch information
jeromekelleher authored Dec 17, 2024
2 parents 7b08ea7 + 369ca03 commit 33a72d6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions sc2ts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,14 @@ def _run_extend(out_path, verbose, log_file, **params):
resource_usage = summarise_usage(ts)
logger.info(resource_usage)
print("resources:", resource_usage, file=sys.stderr)
df = pd.DataFrame(
ts.metadata["sc2ts"]["daily_stats"][date]["samples_processed"]
).set_index("scorpio")
del df["total_hmm_cost"]
df = df[list(df.columns)[::-1]].sort_values("total")
print(df, file=sys.stderr)
data = ts.metadata["sc2ts"]["daily_stats"][date]["samples_processed"]
if len(data) > 0:
df = pd.DataFrame(
ts.metadata["sc2ts"]["daily_stats"][date]["samples_processed"]
).set_index("scorpio")
del df["total_hmm_cost"]
df = df[list(df.columns)[::-1]].sort_values("total")
print(df, file=sys.stderr)


@click.command()
Expand Down

0 comments on commit 33a72d6

Please sign in to comment.