From 2f55bd72fb892f815e0cf9c04accefa76a42d471 Mon Sep 17 00:00:00 2001 From: Mia Croiset <mia.croiset@ens-lyon.fr> Date: Mon, 22 Jan 2024 14:17:43 +0100 Subject: [PATCH] correct --- bin/hicstuff_build_matrix.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/hicstuff_build_matrix.py b/bin/hicstuff_build_matrix.py index 194a9d3..cf3fea2 100755 --- a/bin/hicstuff_build_matrix.py +++ b/bin/hicstuff_build_matrix.py @@ -72,7 +72,8 @@ def pairs2matrix( # ) cmd = 'grep -v ^# %s | sort -S 2G -k8,8n -k9,9n --parallel=1' % pairs_file - os.system(cmd '>>' prem_mat_file) + with open(pre_mat_file, "a") as fout: + fout.write(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