Skip to content

Commit

Permalink
Revert back to percent
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Apr 28, 2024
1 parent 36e8eda commit f8784ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jcvi/assembly/kmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,15 @@ def run_optimization(termination=0.999, maxiter=100):
copy_num = start if start == end else "{}-{}".format(start, end)
g_copies = int(round(g * mid * (end - start + 1)))
copy_series.append((mid, copy_num, g_copies, g))
copy_message = f"CN {copy_num}: {g_copies / 1e6:.1f} Mb ({ g_copies * 100 / genome_size:.1f} %)"
copy_message = f"CN {copy_num}: {g_copies / 1e6:.1f} Mb ({ g_copies * 100 / genome_size:.1f} percent)"
copy_messages.append(copy_message)
m += copy_message + "\n"

if genome_size > inferred_genome_size:
g_copies = genome_size - inferred_genome_size
copy_num = "{}+".format(end + 1)
copy_series.append((end + 1, copy_num, g_copies, g_copies / (end + 1)))
m += f"CN {copy_num}: {g_copies / 1e6:.1f} Mb ({ g_copies * 100 / genome_size:.1f} %)\n"
m += f"CN {copy_num}: {g_copies / 1e6:.1f} Mb ({ g_copies * 100 / genome_size:.1f} percent)\n"

# Determine ploidy
def determine_ploidy(copy_series, threshold=0.15):
Expand Down

0 comments on commit f8784ad

Please sign in to comment.