Georgia Tsambos

Results 31 comments of Georgia Tsambos

Is the idea that this would be used like this? ```python class IbdResult(self, write_to_file=True, total_segment_count=True): self.outfile = something self.total_segment_count = 0 def add_segment(self, left, right, sample_a, sample_b, ancestor, time): if...

> I've added time here because this seems like a useful thing to provide the result object. Otherwise, we'd have to keep a reference to the tree sequence to find...

> in practise we'd probably need the time for sample_a and sample_b as well for this to be generally useful, and it's not that big a deal keeping a reference...

> Ideally we'd squash "in place" as the segments are added to the structure. Do you know if this is possible? I was thinking about this too. The problem is...

> So, in this example from the docs, we'd squash the segment for (1,2) into one? yup, that's right. Here's another example: ``` # # 5 | # / \...

Sure, here's an example of some output I pulled out of a simulated tree sequence: ``` (4, 9): [IdentitySegment(left=6.0, right=10.0, node=37), IdentitySegment(left=0.0, right=2.0, node=42), IdentitySegment(left=5.0, right=6.0, node=42), IdentitySegment(left=2.0, right=5.0, node=42)]...

> This is a bit problematic because the numbers that we are currently reporting when we don't store segments won't be accurate. It'll be a pretty disruptive change I think,...

in my latest changes to #2460 (pushed last week, but I'm only getting round to talking about it now -- sorry!!), I've added some python code that sorts and squashes...

> doesn't that mean that we have to keep track of all IBD segments, basically forever, even with min_length It's definitely a pain. What we could do is 1. add...

Sorry Peter, I missed this! So what you're referring to is the list of ancestral segments (an internal object) whereas I'm referring to the outputted list of IBD segments --...