From 8eb75f80351751b25b9c65c3eae81513b7a4e9dd Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Mon, 21 Oct 2024 22:35:10 +0100 Subject: [PATCH] Fix time-zero logic --- sc2ts/info.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sc2ts/info.py b/sc2ts/info.py index 257ed7c..d741f64 100644 --- a/sc2ts/info.py +++ b/sc2ts/info.py @@ -492,10 +492,8 @@ def _preprocess_nodes(self, show_progress): self.nodes_metadata = {} self.nodes_sample_group = collections.defaultdict(list) samples = ts.samples() - last_sample = ts.node(samples[-1]) - self.nodes_date[last_sample.id] = last_sample.metadata["date"] - self.time_zero_as_date = self.nodes_date[last_sample.id] + self.time_zero_as_date = np.array([self.date], dtype="datetime64[D]")[0] self.earliest_pango_lineage = {} self.pango_lineage_samples = collections.defaultdict(list)