Skip to content

Commit

Permalink
Fix empty selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Phlya committed Jul 17, 2020
1 parent 4eb26a1 commit 41d5ed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion coolpuppy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def parse_args_coolpuppy():
""",
required=False,
)
parser.set_defaults(bed_ordered=True)
# parser.set_defaults(bed2_ordered=True)
parser.add_argument(
"--pad",
default=100,
Expand Down
5 changes: 3 additions & 2 deletions coolpuppy/coolpup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,9 @@ def pileup_chrom(
mids = self.CC.control_regions(filter_func)
else:
mids = self.CC.pos_stream(filter_func)
mids_row1 = mids.__next__()
if mids_row1[0] is None: # Checking if empty selection
try:
mids_row1 = mids.__next__()
except StopIteration:
logging.info(f"Nothing to sum up in chromosome {chrom}")
return mymap, mymap, cov_start, cov_end, 0
else:
Expand Down

0 comments on commit 41d5ed4

Please sign in to comment.