Skip to content

Commit

Permalink
Fix drive letter colon bug on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Feb 1, 2024
1 parent 44a3e7b commit a8df777
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cooler/cli/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ def parse_field_param(arg, includes_colnum=True, includes_agg=True):


def parse_bins(arg):
# Provided chromsizes and binsize
if ":" in arg:
chromsizes_file, binsize = arg.split(":")
# User provided chromsizes path and binsize
arg_nodrive = op.splitdrive(arg)[1] # Remove drive + colon if on Windows
if ":" in arg_nodrive:
chromsizes_file, binsize = arg.split(":", -1)
if not op.exists(chromsizes_file):
raise ValueError(f'File "{chromsizes_file}" not found')
try:
Expand Down

0 comments on commit a8df777

Please sign in to comment.