From 4fd7280c433983a26982de9cea1d13d9dfb42ac4 Mon Sep 17 00:00:00 2001
From: Mia Croiset <mia.croiset@ens-lyon.fr>
Date: Mon, 22 Jan 2024 14:23:26 +0100
Subject: [PATCH] correct write

---
 bin/hicstuff_build_matrix.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/hicstuff_build_matrix.py b/bin/hicstuff_build_matrix.py
index cf3fea2..c8bf3e4 100755
--- a/bin/hicstuff_build_matrix.py
+++ b/bin/hicstuff_build_matrix.py
@@ -73,7 +73,7 @@ def pairs2matrix(
 
     cmd = 'grep -v ^# %s | sort -S 2G -k8,8n -k9,9n --parallel=1' % pairs_file
     with open(pre_mat_file, "a") as fout:
-        fout.write(os.system(cmd))
+        fout.write(str(os.system(cmd)))
 
     header_size = len(hio.get_pairs_header(pre_mat_file))
     with open(pre_mat_file, "r") as pairs, open(mat_file, "w") as mat:
-- 
GitLab