From a943eb42f1e3430698677ef4f700a38b70cd468b Mon Sep 17 00:00:00 2001 From: Aryaz Eghbali Date: Wed, 4 Sep 2024 13:08:06 +0200 Subject: [PATCH 1/3] Fixed #154 --- clodius/cli/aggregate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clodius/cli/aggregate.py b/clodius/cli/aggregate.py index 6e8a362..cd1f29b 100644 --- a/clodius/cli/aggregate.py +++ b/clodius/cli/aggregate.py @@ -901,8 +901,8 @@ def _bedgraph( def add_values_to_data_buffers(buffers_to_add, nan_buffers_to_add): curr_zoom = 0 - data_buffers[0] += buffers_to_add - nan_data_buffers[0] += nan_buffers_to_add + data_buffers[0] += buffers_to_add.astype(np.float64) + nan_data_buffers[0] += nan_buffers_to_add.astype(np.float64) curr_time = time.time() - t1 percent_progress = (positions[curr_zoom] + 1) / float(assembly_size) From 676fa9d4d780e9d756f279ba2ce54a0d87b49a16 Mon Sep 17 00:00:00 2001 From: Aryaz Eghbali Date: Wed, 4 Sep 2024 13:17:58 +0200 Subject: [PATCH 2/3] Fixed #154 --- clodius/cli/aggregate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clodius/cli/aggregate.py b/clodius/cli/aggregate.py index 6e8a362..b658a62 100644 --- a/clodius/cli/aggregate.py +++ b/clodius/cli/aggregate.py @@ -901,8 +901,8 @@ def _bedgraph( def add_values_to_data_buffers(buffers_to_add, nan_buffers_to_add): curr_zoom = 0 - data_buffers[0] += buffers_to_add - nan_data_buffers[0] += nan_buffers_to_add + data_buffers[0] += [bta.astype(np.float64) for bta in buffers_to_add] + nan_data_buffers[0] += [nbta.astype(np.float64) for nbta in nan_buffers_to_add] curr_time = time.time() - t1 percent_progress = (positions[curr_zoom] + 1) / float(assembly_size) From eb012e2f31c48620ea211424d1186c05348f343e Mon Sep 17 00:00:00 2001 From: Aryaz Eghbali Date: Wed, 4 Sep 2024 13:57:01 +0200 Subject: [PATCH 3/3] Fixed issue with casting --- clodius/cli/aggregate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clodius/cli/aggregate.py b/clodius/cli/aggregate.py index b658a62..e7e6aaa 100644 --- a/clodius/cli/aggregate.py +++ b/clodius/cli/aggregate.py @@ -901,8 +901,8 @@ def _bedgraph( def add_values_to_data_buffers(buffers_to_add, nan_buffers_to_add): curr_zoom = 0 - data_buffers[0] += [bta.astype(np.float64) for bta in buffers_to_add] - nan_data_buffers[0] += [nbta.astype(np.float64) for nbta in nan_buffers_to_add] + data_buffers[0] += [np.float64(bta) for bta in buffers_to_add] + nan_data_buffers[0] += [np.float64(nbta) for nbta in nan_buffers_to_add] curr_time = time.time() - t1 percent_progress = (positions[curr_zoom] + 1) / float(assembly_size)