Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-fuchs committed Aug 6, 2024
1 parent e09beca commit 1083a59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bamdash/scripts/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def get_coverage_stats(coverage_df, start, stop, min_cov):
if df_subset_cov.empty:
mean_coverage = 0
recovery = 0
elif df_subset_rec.empty and not df_subset_cov.empty:
mean_coverage = sum(df_subset_cov["coverage"])/(stop-start+1)
recovery = 0
else:
mean_coverage = sum(df_subset_cov["coverage"])/(stop-start+1)
recovery = len(df_subset_rec["coverage"])/(stop-start+1)*100
Expand Down

0 comments on commit 1083a59

Please sign in to comment.