Skip to content

Commit

Permalink
Merge pull request #1301 from deeptools/computematrix_args
Browse files Browse the repository at this point in the history
ensure -a/-b are positive
  • Loading branch information
WardDeb authored Mar 27, 2024
2 parents 5a04290 + 9e1a559 commit ae04dad
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 @@ -355,6 +355,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
args.referencePoint = None
Expand Down

0 comments on commit ae04dad

Please sign in to comment.