Skip to content

Commit

Permalink
make sure we print %
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Aug 9, 2024
1 parent aae4ac0 commit ea3ed85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jcvi/graphics/landscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def draw_depth(
if y >= MIN_COVERED_DEPTH:
covered_bp += b.end - b.start
total_bp += b.end - b.start
logger.debug("cov: %s", percentage(covered_bp, total_bp))
logger.debug("cov: %s", percentage(covered_bp, total_bp, precision=0))

x, y, c = zip(*data)
ax.scatter(
Expand Down Expand Up @@ -435,11 +435,11 @@ def draw_depth(
size=15,
)
if calculate_coverage:
cov_pct = percentage(covered_bp, total_bp, mode=None)
cov_pct = percentage(covered_bp, total_bp, precision=0, mode=None)
root.text(
0.95,
0.25,
f"Coverage: {cov_pct}",
latex(f"cov: {cov_pct}"),
color="darkslategray",
ha="center",
va="center",
Expand Down

0 comments on commit ea3ed85

Please sign in to comment.