tskit-dev / tskit

Population-scale genomics
MIT License
153 stars 72 forks source link

tmrca error when common ancestor does not exist #2866

Closed daikitag closed 11 months ago

daikitag commented 11 months ago

When doing ancestry simulations through the fixed_pedigree model, it is possible to have no common ancestor, as shown in the diagram below. image However, in this case, we get an uninformative error when running tmrca function. image Since some people might be interesting in writing a for loop to examine the time to the MRCA for each node combination, would it be possible to return np.inf or an informative error when this happens?

jeromekelleher commented 11 months ago

I thought we'd fixed something like this recently - are you on the most recent tskit version @daikitag?

daikitag commented 11 months ago

@jeromekelleher Sorry, I was using version 0.5.5, and it seems that an informative error is coming out.