Skip to content

Commit

Permalink
ensure -a/-b are positive
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb committed Mar 27, 2024
1 parent 5a04290 commit 5a58993
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions deeptools/computeMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,14 @@ def process_args(args=None):

if args.quiet is True:
args.verbose = False

# Ensure before and after region length is positive
if args.beforeRegionStartLength < 0:
print(f"beforeRegionStartLength changed from {args.beforeRegionStartLength} into {abs(args.beforeRegionStartLength)}")
args.beforeRegionStartLength = abs(args.beforeRegionStartLength)
if args.afterRegionStartLength < 0:
print(f"afterRegionStartLength changed from {args.afterRegionStartLength} into {abs(args.afterRegionStartLength)}")
args.afterRegionStartLength = abs(args.afterRegionStartLength)

if args.command == 'scale-regions':
args.nanAfterEnd = False
Expand Down

0 comments on commit 5a58993

Please sign in to comment.