We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15dee64 commit e693543Copy full SHA for e693543
tsinfer/inference.py
@@ -1903,7 +1903,11 @@ def add_sites(self, exclude_positions=None):
1903
zeros = np.zeros(self.num_samples, dtype=np.int8)
1904
self.ancestor_builder.add_site(tskit.UNKNOWN_TIME, zeros, terminal=True)
1905
self.num_sites += 1
1906
- self.terminal_position = np.array([last_position + 1], dtype=np.float64)
+
1907
+ terminal_position = last_position + 1
1908
+ if terminal_position == self.variant_data.sequence_length:
1909
+ terminal_position -= 0.5
1910
+ self.terminal_position = np.array([terminal_position], dtype=np.float64)
1911
1912
logger.info("Finished adding sites")
1913
0 commit comments