Skip to content

Commit

Permalink
fixed mean coverage calculation (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-fuchs committed Dec 18, 2023
1 parent 6114f1c commit 09bf627
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bamdash/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""interactively visualize coverage and tracks"""
_program = "bamdash"
__version__ = "0.2.2"
__version__ = "0.2.3"
2 changes: 1 addition & 1 deletion bamdash/scripts/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_coverage_stats(coverage_df, start, stop, min_cov):
mean_coverage = 0
recovery = 0
else:
mean_coverage = statistics.mean(df_subset["coverage"])
mean_coverage = sum(df_subset["coverage"])/(stop-start)
recovery = len(df_subset["coverage"])/(stop-start+1)*100

return round(mean_coverage), round(recovery, 2)
Expand Down

0 comments on commit 09bf627

Please sign in to comment.