Skip to content

Commit

Permalink
add logic for small contigs
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Feb 25, 2025
1 parent 2579cd5 commit f5cfc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion harpy/bin/molecule_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
def new_intervals(contig_len, windowsize) -> list:
starts = list(range(0, contig_len + 1, windowsize))
ends = [i for i in starts[1:]]
if ends[-1] != contig_len:
if not ends or ends[-1] != contig_len:
ends.append(contig_len)
return [range(i,j) for i,j in zip(starts,ends)]

Expand Down

0 comments on commit f5cfc13

Please sign in to comment.