diff --git a/coolpuppy/__main__.py b/coolpuppy/__main__.py index 33ea605..99f54f4 100644 --- a/coolpuppy/__main__.py +++ b/coolpuppy/__main__.py @@ -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, diff --git a/coolpuppy/coolpup.py b/coolpuppy/coolpup.py index 47498af..657396d 100644 --- a/coolpuppy/coolpup.py +++ b/coolpuppy/coolpup.py @@ -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: