You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove mandatory sample_pairs argument in find_ibd #1639
With the updates to find_ibd in #1637 it's now possible to reason about the IBD segments without having to explicitly convert them all to Python objects, removing a significant memory block. However, we still have to provide the list of sample pairs explicitly as input, which basically rules out using find_ibd as a way to discover recent IBD segments in a large tree sequence. It should be possible to call ts.find_ibd(max_time=100) on a tree sequence with a large number of samples (10^6, say), and to get back a sensible result. At the moment this isn't possible.
Technically, what we want to achieve this is a sparse way of storing the IBD segments for a given pair of nodes (a, b) in the IBD result struct. A hash table is the obvious choice, but pulling in a dependency for a C hash table is tedious and would inevitably have some drawbacks. However, given the key-space is so well defined here, I think we can probably roll our own simple hash table (with linear probing) implementation easily enough. All we need is a hash function h, that approximately uniformly distributes a pair of integers (a, b) into the hash table range. So, concretely, suppose 0 <= a < b < 10**6 and H = 10000 (say), what's a good function to do this?
There's a range of options here for what we might want to find IBD in, and the strategy that we take for storing the segments will depend on their properties. Suppose we are working with a large tree sequence, with 10^6 samples. I can see three distinct things we might want to do:
Find IBD segments from all possible pairs, going back some short-ish time into the past (if it's not shortish, then basically all pairs will have some IBD, and the calculation is infeasible --- 10^12 is not a reasonable number)
Find IBD segments from all pairs within a given set of samples S. This is feasible for |S| up to around 100, say.
Find IBD segments from some specific set of pairs, say a handful of samples each from K different populations.
From an API perspective, I think we can handle each of these three cases using the existing samples argument: if samples is None, we're in case (1); if samples is a 1D list, we're in case (2); if samples is a 2D list, we're in case (3).
The question then is, how do we store the segments for each of these cases (and, how do we ensure we don't store segments for pairs we're not interested in for (2) and (3))?
Case 1 - sparse sample from all possible pairs
This has to be done using either a hash table (or AVL tree). We are interested in all pairs, so we just maintain a mapping from pairs -> list of segments observed.
Case 2 - Dense sampling from a small set of samples
This is probably best done using an approach like this:
classIbdResult:
""" Class representing the IBD segments in a tree sequence for a given set of sample pairs. """def__init__(self, ts, pairs):
# Create a mapping from the input samples IDs to an integer index.# The ordering is arbitrary, we just need to able to assign a unique# value to eachself.sample_pairs=pairsself.sample_index_map=np.zeros(ts.num_nodes, dtype=int) -1self.num_samples=0forpairinpairs:
foruinpair:
ifself.sample_index_map[u] ==-1:
self.sample_index_map[u] =self.num_samplesself.num_samples+=1self.segment_map= [Nonefor_inrange(self.num_samples**2)]
forpairinpairs:
index=self.get_dense_pair_index(*pair)
self.segment_map[index] = []
defget_dense_pair_index(self, a, b):
ifa>b:
tmp=aa=bb=tmpa_index=self.sample_index_map[a]
b_index=self.sample_index_map[b]
asserta_index>=0andb_index>=0# TODO this should raise a KeyErrorindex=a_index*self.num_samples+b_indexreturnindexdefadd_segment(self, a, b, seg):
index=self.get_dense_pair_index(a, b)
ifself.segment_map[index] isnotNone:
self.segment_map[index].append(seg)
So, we have constant-time lookup when storing the segments, and the memory cost is O(|S|^2), where S is the specific set of samples we're interested in. Since |S| must be fairly small to make this feasible at all (we're already incurring quadratic space complexity storing the results) this seems like a good approach.
Case 3 - random sample of all possible pairs
In this case we know the specific pairs we're interested in, but the total number of different samples we're considering could be large, so we can't have an O(n^2) memory cost. In this case, there's no option but to have a log time lookup cost. One way we could do this is to sort the input pairs, and binary search them at insertion time, something like this:
classIbdResult:
""" Class representing the IBD segments in a tree sequence for a given set of sample pairs. """def__init__(self, ts, pairs):
# Sort the pairs so we can binary search them# TODO Also canonicalise the pair orderingself.sample_pairs=sorted(pairs)
self.segment_map= [[] for_inself.sample_pairs]
defget_dense_pair_index(self, a, b):
key= (a, b) ifa<belse (b, a)
# TODO this would be done with binary searchtry:
returnself.sample_pairs.index(key)
exceptValueError:
return-1defadd_segment(self, a, b, seg):
index=self.get_dense_pair_index(a, b)
ifindex!=-1:
self.segment_map[index].append(seg)
Conclusion
I guess case 1 and case 3 are the most important, since case 2 can be covered (albeit less efficiently) by case 3. Both case 1 and case 3 would be handled reasonably well by an AVL tree, with some run-time options determining what we do when we see an unknown key. A hash table would probably do well at case 1, but it's less obvious to me how it would handle case 3.
When I did case 2 it was with a few thousand samples and there were O(1) segments per pair, so your upper bound of |S|=100 is rather conservative. (That was across the whole genome, though, so maybe per-chromosome it's more like case 1.)
Another mode we'd like to report things in is as summaries: e.g. to return the number of segments in each of some set of length bins across all pairs of samples. I'm not sure how that interacts with this.
Thanks Jerome. I will have another read through the RaPID, FastSMC, iLASH etc papers this evening. From memory they are most focused on Case 1, and presumably would have faced similar issues about the sparseness of records per sample pair.
I think we should write a section in the IBD manuscript about these considerations as well, as it's clearly something any future fine-scale IBD method will have to take into account!
Another mode we'd like to report things in is as summaries: e.g. to return the number of segments in each of some set of length bins across all pairs of samples. I'm not sure how that interacts with this.
I'm not sure there's any way of returning this without reducing the resolution of the outputted information, and potentially creating a wholly different output structure to hold it, so at this point I think I'd encourage people to create their own summaries using other tools. It sounds like Jerome's work in #1637 will allow simple properties of the output to be queried directly from the C objects -- perhaps this would make it easier to find all segments with lengths in some particular bin.
It might be possible to get all IBD segments dating from particular "time bin" by applying find_IBD to an edge table that has been simplified to only hold ancestors from the desired epoch, but that's a different matter. If I can get it working I think I'll make it into an advanced example for the tutorial.
I think we could do this sort of thing by adding some options to the output struct in #1637@gtsambos - we can imagine just incrementing a counter for every segment that's added for a particular pair, rather than just storing them. This is one of the nice things about decoupling the result from the calculation of the segments.
The detection of sets of shared haplotypes can be reduced to linear computational complexity by means of hashing[40,44] or by use of the positional Burrows-Wheeler transform (PBWT). However, the generation of pairwise IBD segments from these sets scales quadratically with sample size, because the number of pairs of individuals grows quadratically with sample size. Consequently, detecting IBD segments in biobank-scale data is challenging. As well as computation time being an issue, some algorithms require unfeasibly large amounts of computer memory to analyze such datasets.
How they solve the problem:
Seed IBS segments are extended as soon as they are identified by the PBWT. After extension, segments that are longer than the minimum output segment length are immediately printed to an output buffer, which is flushed to disk when full. Consequently, only a limited number of IBD segments are stored in memory at any time.
Is this a sensible approach for us? find_ibd doesn't need to revisit the IBD segments once it's created them, so in that sense there's no reason why it couldn't be written to disk. However, it would mean that we'd have to do multiple C-Python conversions instead of just one, and I'm not sure the structures we're working with facilitate appending in this way.
Also, I wonder whether this approach makes it harder to query the IBD information afterwards -- like, if they are literally just appending segments to some output file in the order they are found, it would take quite a while to find all the segments corresponding to a particular sample pair, for example.
This is potentially a solution to Case 1 though, @jeromekelleher: if there was some alternative IBD struct that users could select where the IBD segments are just outputted as one big list, instead of in a big sparse matrix or similar. That would pass the buck of lookup costs onto the user, but if you are expecting only a small fraction of your sample pair to yield IBD segments anyway, maybe that's an acceptable tradeoff.
^ Btw, this is also the type of output produced by phasedIBD and ARGON, and possibly most other methods: you just get left-to-right lists of IBD segments. All of these other methods leave querying the output up to the user. In many cases, I imagine our dictionary output is much more user-friendly, but it does mean that we're being a bit unfair to ourselves when running all these memory comparisons.
Hmm, interesting thoughts @gtsambos, maybe this is the way to go.
Suppose we did something like this:
result=ts.find_ibd(file="ibd_segs.bin")
# Now, result is backed by this file, and we can query it likeprint(result[(0, 1)])
# Or, later, we can load it likeresult=tskit.IbdResult.load("ibd_segs.bin")
If no file argument is specified, it default to using an in-memory temporary file.
If we can guarantee some sortedness properties of the segments in the file we could probably do this efficiently? It's a fair bit of complexity though, tbh.
Ignoring lookup costs for the moment, I guess the basic premise here is that lists are more efficient than dictionaries when there is less then 1 item per key, and vice versa when there is more than 1 item per key. So it would be good to provide the user with an option to choose either of these outputs depending on their use case.
So there are actually two different memory reduction techniques that I'm seeing here.
(1) is just returning all of the segments in a list, ie. without any dictionary holding them. The way I see it, each IBD segment is basically just a tuple (u, v, l, r, a) where u and v are the sample nodes, [l, r) the genomic interval and a the IBD ancestor. The list of all such segments could be returned as a numpy array with 5 cols, similar to how we currently do but with extra columns for the pair indices. I think this would definitely be smaller than the dictionary output as long as the expected number of IBD segments per pair is < 1, and significantly so if it is << 1.
(2) is to save the IBD segments to disk as we go which also allows us to remove them from active memory.
I'm guessing that (1) will be easier to implement than (2), right? Perhaps this would be the way to start here.
I coded a small c++ program to post-process large hap-ibd result file. (should be able to convert to c)
I did something similar by creating a struct (packed) containing:
samle_id1
hap_id1
sample_id2
hap_id2
start_bp_id
end_bp_id
For each chromosome, I made a ‘meta’ file where I used unordered_map to map sample names to sample id, and positions in bp to position id. To be able to visit genotype information, i coded each allele as a 2-bit field (0, 1, missing, missing can be omitted here) and all genotypes into a byte array
Hap-ibd gives us text results. So I need to encode each pair of VCF file and IBD file for a single chromosome to a pair of binary META file and Binary IBD file. This step might be easier to do in tskit as we have binary information already.
Once all the relevant information are in binary, I saved to file (eg, via htslib/bgzip which when indexed allows for quick random access)
I sorted the binary IBD file via implementing an external sorting/tournament tree sorting algorithm. (without modifying META file)
What I haven’t done in my code but it is doable is to allow random access block of IBD records by indexing the sorted IBD file, for example using bgzip
find-ibd might have different result format from hap-ibd, but I agree with @gtsambos , the result can be saved to file in a similar way.
Thanks @gbinux, that's interesting. OK, lots to think about here. I guess we should get the IBD result struct merged first, and then see about what we need to do to support the semantics that we're interested in. I think we should do this first using in-memory structures, and then think about what we would need to do to writing to file and having efficient lookup.
One more thought here - if we're producing so many ibd blocks that we need to write them to disk on the fly, then certainly no-one is going to want to actually look at them individually; they're summarizing them. So if we provide a mechanism to summarize them on the fly rather than outputting them all, then we'll do much better than the output-to-disk approach, and save the user some big headaches. In terms of summarizing, each block has (a) endpoints (b) a length (c) a pair of samples; so people might want various summaries of these (eg distribution of endpoints along the genome for blocks between pops A and B). Might we even provide an interface where the user can pass in a python summary function, like in the general stats method?
One more thought here - if we're producing so many ibd blocks that we need to write them to disk on the fly, then certainly no-one is going to want to actually look at them individually; they're summarizing them. So if we provide a mechanism to summarize them on the fly rather than outputting them all, then we'll do much better than the output-to-disk approach, and save the user some big headaches. In terms of summarizing, each block has (a) endpoints (b) a length (c) a pair of samples; so people might want various summaries of these (eg distribution of endpoints along the genome for blocks between pops A and B). Might we even provide an interface where the user can pass in a python summary function, like in the general stats method?
This would be much much better if users can avoid processing raw IBD results at all!! The summaries might also include, for example, windowed IBD coverage, and sample-pair genome-wide total IBD (numbers of all possible pairs would generate a sparse matrix or dense one depending on how we filter IBD by length or time), etc.
I recognise that most users will be summarising the IBD output in some way -- however, they will often want to use a variety of statistics, and for many exploratory analyses it may not even be clear which summaries are needed at first. I'm worried that users would end up running find_ibd separately for all their separate statistics, which is really inefficient.
However, I think it would be really useful to have a separate package that computes various summaries of find_ibd output in all of these various ways (or even just, separate methods in tskit that act on IbdResult objects, whatever they end up looking like.) This would allow users to get at these summaries without ever having to look inside the IbdResult objects themselves. What do you think, @gbinux and @petrelharp?
Ignoring lookup costs for the moment, I guess the basic premise here is that lists are more efficient than dictionaries when there is less then 1 item per key, and vice versa when there is more than 1 item per key. So it would be good to provide the user with an option to choose either of these outputs depending on their use case.
I just mocked up an example to illustrate this point:
I'm worried that users would end up running find_ibd separately for all their separate statistics, which is really inefficient.
Would it be less efficient than writing out a giant file, then re-processing it every time you compute a new statistic?
However, I think it would be really useful to have a separate package that computes various summaries of find_ibd output in all of these various ways (or even just, separate methods in tskit that act on IbdResult objects, whatever they end up looking like.) This would allow users to get at these summaries without ever having to look inside the IbdResult objects themselves. What do you think, @gbinux and @petrelharp?
I guess so? I do think that we'll want to have methods that summarize things from the tree sequence itself, for the cases when there's too many ibd segments to store them all. I think that making an IBD results object is a great idea, but since we'll want to summarize from the tree sequence anyhow, I'd rather work in that direction than in the direction of allowing even bigger IBD results objects.
To be clear, I don't have a strong opinion here - either way would work, and we're going for 'good enough'.
I think @petrelharp has hit the nail on the head here; we should (in future) support computing summaries directly from the data, without storing the segments. We can do this via an option to find_ibd, which is then passed to the ibd_result_t class. When a segment is added, we just update the summaries then instead of storing the segment. IF we hit the situation where someone needs different summaries and they can't fit the segments in memory, then we can consider writing to file. Before that, it's premature optimisation. (We can follow up separately on the summary statistics - probably best to create an issue to track this?)
Initially, we should just support efficient access to the segments in memory.
The question that we need to answer in order to finish up this discussion though, is, what are the required semantics for the samples argument? I.e., do we continue to support finding IBD segments for just a subset of sample pairs, or do we revert to finding IBD segments among all possible pairs? (I think we should keep the subset semantics, but just checking in case anyone thinks this is pointless)
I think keeping samples/sample pairs argument makes sense. For example, we might want to calculate inter-population IBD sharing (case 3) and intra-population IBD sharing.(Case 2)
Okay, if everyone else sees this as the way forward that's fairly compelling! I've made #1645 to discuss the summary statistic ideas further.
I think keeping samples/sample pairs argument makes sense. For example, we might want to calculate inter-population IBD sharing (case 3) and intra-population IBD sharing.(Case 2)
I support keeping sample_pairs for this reason too -- in some cases users might only be interested in cross-coalescent IBD segments.
Activity
petrelharp commentedon Aug 20, 2021
Wouldn't another option be to store the indices in an AVL tree?
jeromekelleher commentedon Aug 20, 2021
Totally - but we don't have an AVL tree implementation we can use because of licencing☹️
petrelharp commentedon Aug 20, 2021
oh, darn it.
jeromekelleher commentedon Aug 22, 2021
There's a range of options here for what we might want to find IBD in, and the strategy that we take for storing the segments will depend on their properties. Suppose we are working with a large tree sequence, with 10^6 samples. I can see three distinct things we might want to do:
From an API perspective, I think we can handle each of these three cases using the existing
samplesargument: ifsamplesis None, we're in case (1); if samples is a 1D list, we're in case (2); if samples is a 2D list, we're in case (3).The question then is, how do we store the segments for each of these cases (and, how do we ensure we don't store segments for pairs we're not interested in for (2) and (3))?
Case 1 - sparse sample from all possible pairs
This has to be done using either a hash table (or AVL tree). We are interested in all pairs, so we just maintain a mapping from pairs -> list of segments observed.
Case 2 - Dense sampling from a small set of samples
This is probably best done using an approach like this:
So, we have constant-time lookup when storing the segments, and the memory cost is O(|S|^2), where S is the specific set of samples we're interested in. Since |S| must be fairly small to make this feasible at all (we're already incurring quadratic space complexity storing the results) this seems like a good approach.
Case 3 - random sample of all possible pairs
In this case we know the specific pairs we're interested in, but the total number of different samples we're considering could be large, so we can't have an O(n^2) memory cost. In this case, there's no option but to have a log time lookup cost. One way we could do this is to sort the input pairs, and binary search them at insertion time, something like this:
Conclusion
I guess case 1 and case 3 are the most important, since case 2 can be covered (albeit less efficiently) by case 3. Both case 1 and case 3 would be handled reasonably well by an AVL tree, with some run-time options determining what we do when we see an unknown key. A hash table would probably do well at case 1, but it's less obvious to me how it would handle case 3.
Any thoughts?
petrelharp commentedon Aug 22, 2021
Sounds good to me? Two tangential thoughts:
gtsambos commentedon Aug 23, 2021
Thanks Jerome. I will have another read through the RaPID, FastSMC, iLASH etc papers this evening. From memory they are most focused on Case 1, and presumably would have faced similar issues about the sparseness of records per sample pair.
I think we should write a section in the IBD manuscript about these considerations as well, as it's clearly something any future fine-scale IBD method will have to take into account!
gtsambos commentedon Aug 23, 2021
I'm not sure there's any way of returning this without reducing the resolution of the outputted information, and potentially creating a wholly different output structure to hold it, so at this point I think I'd encourage people to create their own summaries using other tools. It sounds like Jerome's work in #1637 will allow simple properties of the output to be queried directly from the C objects -- perhaps this would make it easier to find all segments with lengths in some particular bin.
It might be possible to get all IBD segments dating from particular "time bin" by applying find_IBD to an edge table that has been simplified to only hold ancestors from the desired epoch, but that's a different matter. If I can get it working I think I'll make it into an advanced example for the tutorial.
jeromekelleher commentedon Aug 23, 2021
I think we could do this sort of thing by adding some options to the output struct in #1637 @gtsambos - we can imagine just incrementing a counter for every segment that's added for a particular pair, rather than just storing them. This is one of the nice things about decoupling the result from the calculation of the segments.
gtsambos commentedon Aug 24, 2021
From the hap-IBD paper:
How they solve the problem:
gtsambos commentedon Aug 24, 2021
Is this a sensible approach for us? find_ibd doesn't need to revisit the IBD segments once it's created them, so in that sense there's no reason why it couldn't be written to disk. However, it would mean that we'd have to do multiple C-Python conversions instead of just one, and I'm not sure the structures we're working with facilitate appending in this way.
Also, I wonder whether this approach makes it harder to query the IBD information afterwards -- like, if they are literally just appending segments to some output file in the order they are found, it would take quite a while to find all the segments corresponding to a particular sample pair, for example.
gtsambos commentedon Aug 24, 2021
This is potentially a solution to Case 1 though, @jeromekelleher: if there was some alternative IBD struct that users could select where the IBD segments are just outputted as one big list, instead of in a big sparse matrix or similar. That would pass the buck of lookup costs onto the user, but if you are expecting only a small fraction of your sample pair to yield IBD segments anyway, maybe that's an acceptable tradeoff.
gtsambos commentedon Aug 24, 2021
^ Btw, this is also the type of output produced by phasedIBD and ARGON, and possibly most other methods: you just get left-to-right lists of IBD segments. All of these other methods leave querying the output up to the user. In many cases, I imagine our dictionary output is much more user-friendly, but it does mean that we're being a bit unfair to ourselves when running all these memory comparisons.
jeromekelleher commentedon Aug 24, 2021
Hmm, interesting thoughts @gtsambos, maybe this is the way to go.
Suppose we did something like this:
If no
fileargument is specified, it default to using an in-memory temporary file.If we can guarantee some sortedness properties of the segments in the file we could probably do this efficiently? It's a fair bit of complexity though, tbh.
3 remaining items
gtsambos commentedon Aug 24, 2021
Ignoring lookup costs for the moment, I guess the basic premise here is that lists are more efficient than dictionaries when there is less then 1 item per key, and vice versa when there is more than 1 item per key. So it would be good to provide the user with an option to choose either of these outputs depending on their use case.
bguo068 commentedon Aug 24, 2021
I coded a small c++ program to post-process large hap-ibd result file. (should be able to convert to c)
find-ibd might have different result format from hap-ibd, but I agree with @gtsambos , the result can be saved to file in a similar way.
jeromekelleher commentedon Aug 24, 2021
Thanks @gbinux, that's interesting. OK, lots to think about here. I guess we should get the IBD result struct merged first, and then see about what we need to do to support the semantics that we're interested in. I think we should do this first using in-memory structures, and then think about what we would need to do to writing to file and having efficient lookup.
petrelharp commentedon Aug 24, 2021
One more thought here - if we're producing so many ibd blocks that we need to write them to disk on the fly, then certainly no-one is going to want to actually look at them individually; they're summarizing them. So if we provide a mechanism to summarize them on the fly rather than outputting them all, then we'll do much better than the output-to-disk approach, and save the user some big headaches. In terms of summarizing, each block has (a) endpoints (b) a length (c) a pair of samples; so people might want various summaries of these (eg distribution of endpoints along the genome for blocks between pops A and B). Might we even provide an interface where the user can pass in a python summary function, like in the general stats method?
bguo068 commentedon Aug 25, 2021
This would be much much better if users can avoid processing raw IBD results at all!! The summaries might also include, for example, windowed IBD coverage, and sample-pair genome-wide total IBD (numbers of all possible pairs would generate a sparse matrix or dense one depending on how we filter IBD by length or time), etc.
gtsambos commentedon Aug 25, 2021
I recognise that most users will be summarising the IBD output in some way -- however, they will often want to use a variety of statistics, and for many exploratory analyses it may not even be clear which summaries are needed at first. I'm worried that users would end up running
find_ibdseparately for all their separate statistics, which is really inefficient.However, I think it would be really useful to have a separate package that computes various summaries of find_ibd output in all of these various ways (or even just, separate methods in tskit that act on IbdResult objects, whatever they end up looking like.) This would allow users to get at these summaries without ever having to look inside the IbdResult objects themselves. What do you think, @gbinux and @petrelharp?
gtsambos commentedon Aug 25, 2021
If so, it might be good for us to make a separate issue to discuss these summaries
gtsambos commentedon Aug 25, 2021
I just mocked up an example to illustrate this point:
petrelharp commentedon Aug 25, 2021
Would it be less efficient than writing out a giant file, then re-processing it every time you compute a new statistic?
I guess so? I do think that we'll want to have methods that summarize things from the tree sequence itself, for the cases when there's too many ibd segments to store them all. I think that making an IBD results object is a great idea, but since we'll want to summarize from the tree sequence anyhow, I'd rather work in that direction than in the direction of allowing even bigger IBD results objects.
To be clear, I don't have a strong opinion here - either way would work, and we're going for 'good enough'.
jeromekelleher commentedon Aug 25, 2021
I think @petrelharp has hit the nail on the head here; we should (in future) support computing summaries directly from the data, without storing the segments. We can do this via an option to
find_ibd, which is then passed to theibd_result_tclass. When a segment is added, we just update the summaries then instead of storing the segment. IF we hit the situation where someone needs different summaries and they can't fit the segments in memory, then we can consider writing to file. Before that, it's premature optimisation. (We can follow up separately on the summary statistics - probably best to create an issue to track this?)Initially, we should just support efficient access to the segments in memory.
The question that we need to answer in order to finish up this discussion though, is, what are the required semantics for the
samplesargument? I.e., do we continue to support finding IBD segments for just a subset of sample pairs, or do we revert to finding IBD segments among all possible pairs? (I think we should keep the subset semantics, but just checking in case anyone thinks this is pointless)bguo068 commentedon Aug 25, 2021
I think keeping samples/sample pairs argument makes sense. For example, we might want to calculate inter-population IBD sharing (case 3) and intra-population IBD sharing.(Case 2)
petrelharp commentedon Aug 25, 2021
I agree.
gtsambos commentedon Aug 26, 2021
Okay, if everyone else sees this as the way forward that's fairly compelling! I've made #1645 to discuss the summary statistic ideas further.
I support keeping
sample_pairsfor this reason too -- in some cases users might only be interested in cross-coalescent IBD segments.jeromekelleher commentedon Aug 26, 2021
Great. Let's get #1637 merged first and then we can discuss the semantics of the result object when we have specified a subset of sample pairs.