Skip to content

Commit e78e7ea

Browse files
committed
feat: print out which pairs file (and number of pairs) is used when parsing into cool file
1 parent 4b7b9e2 commit e78e7ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

hicstuff/pipeline.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,19 @@ def _out_file(fname):
10701070
# Build matrix from pairs.
10711071
if mat_fmt == "cool":
10721072

1073+
# Log which pairs file is being used and how many pairs are listed
1074+
pairs_count = 0
1075+
with open(use_pairs, "r") as file:
1076+
for line in file:
1077+
if line.startswith('#'):
1078+
continue
1079+
else:
1080+
pairs_count += 1
1081+
logger.info(
1082+
"Generating matrix from pairs file %s (%d pairs in the file) ",
1083+
use_pairs, pairs_count
1084+
)
1085+
10731086
# Name matrix file in .cool
10741087
mat = os.path.splitext(mat)[0] + ".cool"
10751088

0 commit comments

Comments
 (0)