First X Model Attempt
In June, 2019 I started working on a model of X Chromosome inheritance. The model ran into some problems and I seemed to have given up on it for some time. Seven months later I decided that this was something I still really wanted to do.
I set up the model much in the same way as this autosomal model. The only differences were that males would now have half of the amount of base pairs as females and that X-DNA can’t be passed through a line of two consecutive males.
These were the rules for the X Chromosome model:
- A mother passes half of her available X-DNA to her children.
- X-DNA passed from the mother is done at random, so that it can be from from her father or mother. On average, half will be from her father and half from her mother, but the amount from one instance to another will be highly variable.
- A father passes all of his segments to his daughter, but none to his son.
One consequence of these rules is that a mother will pass a full X Chromosome to her son, but it could likely be recombined from both of her parents. Another is that a father will pass a full X Chromosome from his mother to his daughter. Although it may have been recombined from the paternal grandmother’s two homologues, all of the X DNA that the paternal granddaughter has on one of her X Chromosomes came from that grandmother, preserved over two generations. Indeed, it’s well known that alternating male-female lines preserve the most X-DNA over the generations; although I discovered some small caveats to that, which I’ll discuss later.
I discovered something that astounded me pretty early on in my development of the model. Using the premise that X-DNA can’t be passed through a line of two consecutive males, the fraction of ancestors who can contribute X Chromosome DNA to a female descendant approaches 0.618…, or the inverse of the golden ratio, as generations increase farther back in time. This number is derived from the famous Fibonacci sequence. I first noticed when I was trying to develop a formula for which ancestor would be the first (from the left), in a given generation, to be able to pass X-DNA to a female descendant. Then I noticed that the number of ancestors, as shown by the boxes with color in Figure 1, followed the pattern 2, 3, 5, 8, etc. I decided to investigate a little further and found that I wasn’t the first person to discover this phenomenon. Here’s how it works: both parents, or 100%, can contribute X-DNA. However, a paternal grandfather cannot make a contribution, leaving 3/4 (or 0.75) of grandparents. Only 5/8 (or 0.625) of great-grandparents can contribute X-DNA, and the fraction decreases towards 0.618 from there.
Building the X Chromosome model based on the autosomal model was fairly easy. The only major hurdle this time was that I had to create dictionary keys on-the-fly as well as strings of letters that give the path to one’s ancestor, to be used as labels in the output, for example ‘MMM’ for maternal maternal great-grandmother. I was eventually able to find the information I needed.
Figure 1. Inheritance tree for X Chromosome ancestors up to five generations back. P1_0 signifies a male descendant and M2_0 his sister. Ancestors who can only pass X-DNA to M2_0 are shown in purple. Ancestors who can pass X-DNA to both P1_0 and M2_0 are shown in green. Ancestors who cannot pass DNA to P1_0 or M2_0 are greyed out.
The notation used for the model made it easy for the simulation to create a variable number of ancestors on-the-fly (variable based on the number of generations input by the user). It also made it easy for me to keep track of the generation, left-right position in the tree, and sex of an ancestor. The first character is a letter corresponding to male ancestors (‘P,’ for paternal) or female ancestors (‘M,’ for maternal). Next is a number, taking up only two characters in this figure, but more characters if going seven or more generations back. The number corresponds to the order of the ancestor from left to right, only within a particular generation. The next character is an underscore and that’s followed by the generation of a particular row. Parents are called generation 1, grandparents are generation 2, etc.
As in the autosomal model, the order of ‘genes’ or ‘segments’ didn’t matter. This made for a simpler model at the expense of being a bit less like reality. One result of the previous, autosomal, model was that increasing the number of segments available to pass from parent to child decreased the variability of shared DNA between relatives. This was expected because, for example, it would be nearly impossible for two siblings to inherit all or none of the same DNA if there were hundreds of segments available; however, if one of only two segments were passed from a parent to a child, siblings would always share either all or none of their DNA. So decreasing the number of segments available increases the variability of shared DNA between relatives. The number of segments needed in the autosomal model ended up being about 97.5, on average. The reason it wasn’t around 55, as in real life, was that not requiring the ‘genes’ or ‘segments’ to stay in the same order decreased the variance, requiring more segments to be used in order to increase the variance to match real data.
Finding data for the autosomal model was a dismal affair, but the availability of X Chromosome data is even worse. Something would be needed to tune the simulation, otherwise only the average percentage of shared DNA would be valid. Much more interesting would be to know how much the percentage can vary. The only data I could find was an average number of recombinations and an average percentage of maternal meiosis events in which no recombination took place on the X Chromosome. Since my simulation didn’t preserve gene order, the average number of recombinations wouldn’t help. The only data point available to tune the simulation was that about 14% of the time all of the X-DNA that a mother passes to a child is from one of her parents, and none from the other. This was from a study of 250 grandparent-grandchild relationships, so the results should be statistically significant, although they probably could be improved upon quite a bit.
Since the X Chromosome is obviously way smaller than the combined length of all of the other chromosomes, much fewer (than 97.5) segments would have to be used for an X Chromosome model. Getting the simulation to result in no recombinations about 14% of the time required an input number of segments to be about 4.5, on average. This caused a problem. Using that few segments, the percentages of X-DNA that a granddaughter could share with a maternal grandparent were as follows: 0%, 16.67%, 25%, 33.3%, and 50%, with no values in between. With a maternal grandfather, a grandson could share 0%, 33.3%, 50%, 66.7%, or 100%. I wasn’t satisfied with that level of resolution and I thought that it might affect the variance. Something would have to be done to increase the number of segments, which would result in better resolution, but without decreasing the percentage of times that no recombination takes place.
I decided do something I’ve long intended to try with my autosomal model: have two ordered sets of genes, allowing crossover, but keep the original order throughout the simulation, i.e. simulated segments or genes would stay at the same loci.
A good approximation for the number of recombinations a chromosome undergoes is the Poisson distribution, so I used that in this model. Real chromosomes are more likely to recombine in certain places, however that wasn’t taken into account here. I only needed a model input for the average value of the Poisson distribution. In the same study mentioned above, in which 250 grandparent-grandchild relationships were compared, the average number of recombinations on the X Chromosome was 1.655. I don’t know if that study took into account double or higher-order crossover events. If not, the true average number could potentially be larger than 1.655. I also don’t know if many of those grandparent-grandchild relationships were from the same parents and/or same grandparents. I wouldn’t be surprised at all if certain people tend to have more or fewer recombinations events. But I know, for example concerning autosomal DNA, that my mother passed more of her father’s DNA than her mother’s DNA six out of six times. A future study with more grandparent-grandchild relationships or one that doesn’t include the same parents multiple times might find that the average number of recombination events is slightly different than 1.655.
There are two effects that occur when the Poisson average, λ, is increased:
- Increasing λ decreases the standard deviation of shared DNA between relatives.
- A larger number of available segments should be used, which causes a different set of effects.
Here are the effects of changing the number of available segments:
- Increasing the number of segments available increases the standard deviation of DNA shared between relatives.
- Increasing the number of segments provides for better resolution in the shared DNA between relatives, i.e. fixing the problem above in which a grandchild might only receive 0%, 33.3%, 50%, 66.7%, or 100%, but no values in between, of their grandparent’s DNA.
- Decreasing the number of segments available slightly narrowed the range of expected percentages for a 90% confidence interval. But this is only a good result if accurate, so it isn’t a valid reason to change the input.
- Decreasing the number of segments available risks cutting off some of the higher values of the Poisson distribution, resulting in a lower average, λ, than was inputted.
Combining those effects, if the standard deviation of the simulation is known to be higher than in real-world data, the Poisson average, λ, could be increased, the number of segments could be decreased, or both. However, increasing λ will often mean that the number of segments needs to be increased to make sure that the high end of the distribution isn’t being cut off. And increasing the number of segments will potentially cancel out the effects of increasing λ.
Note that the goal isn’t simply to find a combination of λ and number of segments that results in the right simulation. It would be preferable to use the value of λ that best approximates the average number of recombinations on the X Chromosome in real life, and then to use the number of segments that best approximates the standard deviation of shared DNA between relatives in real life. Hopefully, then, the percentage of events in which no recombination occurred in the simulation would also match the data in real life.
To train the model, I started by only compared the shared X-DNA between two siblings each trial run. The sex of the siblings wouldn’t matter, since I would only compare the X-DNA that came from maternal grandparents, i.e. that which has potentially been recombined. I have a small dataset of shared percentages of X-DNA between siblings. I admit that it isn’t a good dataset because it contains only 21 sibling pairs. (I found out recently that there doesn’t appear to be a way to see how much maternal X-DNA two full sisters share on GEDmatch because it only shows one homologue of the X Chromosome. It will show a 100% match for the paternal homologue, but won’t list the segments of the maternal homologue. Otherwise, I could add a few more known sibling pairs to my dataset.) Of course I found that the average shared percentage between siblings is about 50%. What’s of interest is that the standard deviation appears to be about 22.25%. I trained the simulation with the goal of reaching a standard deviation between siblings close to that value.
Using λ = 1.655 and 12 available segments, the standard deviation came out to about 23.6%. It would be preferable, given the data now available, to get the standard deviation a little lower. Trying λ = 1.7 brought the standard deviation down slightly. However, I then had to increase the number of segments, which would, in turn, increase the standard deviation.
In a test of 500 million Poisson distributions with λ = 1.7, the largest random value returned for any distribution was 13. That number represents the places in between segments that could be cut, so I used 14 segments in the simulation. In my simulations of 500 thousand trial runs, if any of the random Poisson values were greater than 13, it would be extremely rare. The number of segments used is like a maximum value allowed during the simulation. If the Poisson distribution returns 13 or fewer, that’s the number of places in which the 14 segments will be cut. I’ve found that no error occurs in the simulation if the Poisson distribution returns a number higher than the number of places available at which to cut (the number of segments minus one). Instead, the simulation simply defaults to the maximum number available rather than the abnormally high Poisson value. (This wasn’t intentional, but it was convenient.) Figure 2 shows how few Poisson values are generated at the high end of the range.
Figure 2. Histogram of 100 million Poisson values with the same λ used in the model. So few values are generated at the higher end that they can’t be seen. The number of values 7-13 are ~148k, ~31k, ~6k, ~1k, 159, 26, and 2, respectively.
I wasn’t comfortable raising the value of λ any higher than 1.7, so I stuck with that value, which is only rounded up to one decimal place from the source of that statistic (1.655). I used 14 available segments, which likely never resulted in cutting off any abnormally high Poisson values. As mentioned above, my very small dataset of shared DNA between siblings has a standard deviation of 22.25%. The standard deviation for this training model was 23.5%. If a better dataset is produced someday that shows a slightly higher standard deviation, it will be a vindication for this model. If a Poisson distribution with an average greater than 1.7 is someday found to better represent the number of recombinations on the X Chromosome, this model could be slightly adjusted for more accurate results. If another distribution is someday found to better represent X Chromosome recombinations, the simulation could use that instead of the Poisson distribution. Still, I think the results are worth looking at for a model with a standard deviation of 23.5%.
In order to display the results of the simulation, I developed yet another convention for naming ancestors (in addition to the one with underscores in Figure 1). An X Chromosome tree showing ancestors with the new naming convention is shown in Figure 3. ‘M’ stands for maternal and ‘P’ for paternal. Any ancestor with a ‘P’ at the end of his name is a male and any ancestor with an ‘M’ at the end is a female. MPMPM is your mother’s father’s mother’s father’s mother.
Figure 3. X Chromosome inheritance tree for all ancestors up to five generations back, with a new notation that’s convenient for displaying simulation results. P1_0 and M2_0 as in Figure 1. Ancestors who can only pass X-DNA to M2_0 are shown in purple. Ancestors who can pass X-DNA to both P1_0 and M2_0 are shown in green. Ancestors who cannot pass DNA to P1_0 or M2_0 are greyed out.
When calculating the percentage of shared DNA between an ancestor and a female descendant, I had the choice to divide the amount shared by twice the number of segments, since she has two X homologues, which would show the shared X-DNA as a percentage of all of her X-DNA, or I could divide the shared percentage by the same number of segments as for a male descendant. I chose the latter method. There are a lot of advantages for doing it this way and very few for the former. The biggest advantage is that amount of shared DNA is now comparable to that for male descendants. This may cause it to appear that a woman shares 100% of her X-DNA with her mother, as shown below in Figure 4, but, what it really means is that she shares 100% of the X-DNA that she can share with her mother. She shares all of her X-DNA with her mother on the only homologue on which she can share X-DNA with her mother.
Early runs of the simulation showed common patterns that make it easy to predict how much X-DNA one will share with a particular ancestor. These are the two principles:
- If an ancestor is male, all of his X-DNA came from his mother. Simply keep the same percentage for her that’s already displayed for him.
- If an ancestor is female, take the percentage that’s displayed for her and half it for both her mother and father.
Those two rules were applied in order to fill in the values in Figure 4, below.
Figure 4. The percentage of X-DNA that a descendant shares, on average, with all ancestors up to five generations back. Ancestor naming convention as in Figure 3. P1_0 and M2_0 as in Figures 1 and 3. For M2_0, values represent the percentage of her X-DNA she shares with a particular ancestor on only the applicable one of her two X Chromosomes. To find the percentage of her total X-DNA that she shares, divide the percentage in the figure by two.
An interesting result of Figure 4 is that that the sex of the farthest-back ancestor doesn’t matter, nor does the sex of the descendant being compared to a particular ancestor. For example, a grandson will inherit 50%, on average, of his X-chromosome from any maternal grandparent. It doesn’t matter if it’s a maternal grandfather or a maternal grandmother. And it doesn’t matter if it’s a grandson or granddaughter, which allowed for the convenience of only putting one percentage in each box. As mentioned earlier, it’s well known that the greatest amount of X Chromosome DNA is passed down from alternating male-female lines. But one result of this model is that the gender in the first and last generations doesn’t matter, which is something I had never heard before. So, while one might expect that the greatest shared percentage of X-DNA over five generations might be between between a female descendant and her paternal 3g-grandfather, PMPMP, it turns out that she could expect to share the same amount of X-DNA, on average, with her maternal 3g-grandmother, MPMPM. And that’s the same amount that her brother could expect to share with that same ancestor. Still, excluding the first and last generation, the conventional wisdom holds true. While a person shares, on average, 25% of X-DNA with their ancestors MPMP and MPMM (it’s the ‘MPM’ that matters), following the alternating line MPMP farther back in time will find ancestors with greater shared X-DNA than on the MPMM line. Figure 4 showed the percentages I expected to find in the results of the simulation. Let’s see if those are accurate.
|Min.||Avg.||Max.||Std. Dev.||% No Recomb.|
|GD & PM||100%||100%||100%||0%||100%|
|GS & MP||0%||50.0%||100%||30.8%||18.3%|
|GD & MP||0%||50.0%||100%||30.8%||18.2%|
|GS & MM||0%||50.0%||100%||30.8%||18.3%|
|GD & MM||0%||50.0%||100%||30.8%||18.2%|
Figure 5. Two generations distance, 500k trials, 14 gene segments available, average Poisson value input = 1.7. GS stands for grandson and GD for granddaughter. They are compared individually to PM (paternal-maternal/paternal grandmother), MP (maternal-paternal/maternal grandfather), and MM (maternal-maternal/maternal grandmother). The lower and upper values of the 90% confidence interval for this simulation were equal to the minimum and maximum values, respectively.
Figure 5 shows model results with the same percentages that are found in the tree in Figure 4.
|Avg.||90% CI||Std. Dev.||0% Shared||100% Shared|
|GGD & PMP||50.0%||0-100%||30.8%||9.1%||9.1%|
|GGD & PMM||50.0%||0-100%||30.8%||9.1%||9.1%|
|GGS & MPM||50.0%||0-100%||30.9%||9.2%||9.2%|
|GGD & MPM||50.0%||0-100%||30.9%||9.2%||9.1%|
|GGS & MMP||24.9%||0-79%||27.2%||35.9%||0.8%|
|GGD & MMP||25.0%||0-71%||24.8%||27.9%||0.9%|
|GGS & MMM||25.0%||0-79%||27.2%||35.8%||0.9%|
|GGD & MMM||25.0%||0-71%||24.9%||28.0%||0.8%|
Figure 6. Three generations distance, 500k trials, 14 gene segments available. All minimum values were 0%. GGS stands for great-grandson and GGD for great-granddaughter. They are compared individually to PMP (paternal-maternal-paternal, or paternal grandmother’s father), PMM (paternal-maternal-maternal, or paternal grandmother’s mother), MPM (maternal-paternal-maternal, or maternal grandfather’s mother), etc. All maximum values were 100%. Adding the 0% Shared and 100% Shared columns together will give the percentage of trials in which no recombination occurred in at least one of the generations.
With the exception of one value of 24.9% that’s awfully close to 25.0%, and which would likely be 25.0% in a simulation with more trials, Figure 6 shows model results that are identical to those predicted in Figure 4 based on patterns observed from early trial runs.
|Avg.||90% CI||Std. Dev.||0% Shared||100% Shared|
|2G-GD & PMPM||50.0%||0-100%||30.8%||9.1%||9.1%|
|2G-GD & PMMP||25.0%||0-77%||27.2%||35.7%||0.8%|
|2G-GD & PMMM||25.0%||0-77%||27.2%||35.9%||0.8%|
|2G-GS & MPMP||25.0%||0-77%||27.2%||35.8%||0.8%|
|2G-GD & MPMP||25.0%||0-77%||24.8%||27.9%||0.8%|
|2G-GS & MPMM||25.0%||0-77%||27.2%||35.7%||0.8%|
|2G-GD & MPMM||25.0%||0-77%||24.8%||28.0%||0.8%|
|2G-GS & MMPM||24.9%||0-77%||27.2%||35.8%||0.8%|
|2G-GD & MMPM||24.9%||0-77%||24.8%||28.0%||0.8%|
|2G-GS & MMMP||12.5%||0-62%||20.7%||60.8%||0.1%|
|2G-GD & MMMP||12.5%||0-54%||18.8%||53.9%||0.1%|
|2G-GS & MMMM||12.5%||0-62%||20.7%||60.9%||0.1%|
|2G-GD & MMMM||12.5%||0-54%||18.7%||53.9%||0.1%|
Figure 7. Four generations distance, 500k trials, 14 gene segments available, average Poisson value = 1.7. Naming conventions as in previous two tables. Relationships are between 2nd great-grandparents and 2nd great-grandchildren. All minimum values were 0%. All maximum values were 100%. Adding the 0% Shared and 100% Shared columns will give the percentage of trials in which no recombination occurred in at least one of the generations.
Again, these values are nearly identical to those predicted in Figure 4.
I will likely use this model to make a calculator that predicts the amount of DNA a person can share with various relatives. Additionally, I could make one for combinations of various relatives just like in the autosomal calculator. The X chromosome model could even be coupled with the autosomal model at some point. But first, I would rather modify the autosomal model to take into account differences in recombination frequencies between mothers and fathers.
The cover photo shows the path over which the most X-DNA is preserved over many generations in my family. If you had access to the most accurate relationship predictor, would you use it? Feel free to ask a question or leave a comment. And make sure to check out these ranges of shared DNA percentages or shared centiMorgans, which are the only published values that match peer-reviewed standard deviations. Or, try a calculator that lets you find the amount of an ancestor’s DNA you have when combining multiple kits. I also have some older articles that are only on Medium.
I built an X calculator also but its more to figure out how two testers are related than to understand x inheritance. It is a huge database and I’m proofreading it now for data entry errors so it gets corrected and updated every day. But here is an example of how helpful XDNA can be to get closer to the truth of how two testers are related. This morning I was helping my friend Greg with his FTDNA results his closest match shares 432 cm of XDNA with him. In my database I’d round that shared amount down to the closest average which is 6.25% or 422.5 shared cm of Autosomal. There are Eighty different relationship paths that share those numbers spread over 5 different relationship categories. If I was the police and he was a criminal that left DNA at the crime scene that would be a big task to figure out how the two were related. But they share 88 cm of X which is close to 25% of their XDNA which is way more than the pure percent based calculation of X to be expected at 22.5 cm (6.25% matching the percent of autosomal they share). My database when filtered reduced that list of 80 relationship paths to only 6 possible relationship paths over 3 relationship categories.
GRAND UNCLE/AUNT-HALF: MOTHER’S FATHER’S MATERNAL-BRO
GRAND NEPHEW/NIECE-HALF: MATERNAL-BROTHER DAUGHTER SON
1ST COUSIN 1X REMOVED B: MOTHER’S MOTHER’S SISTER’S SON
1ST COUSIN 1X REMOVED A: MOTHER SISTER DAUGHTER SON
1ST COUSIN-HALF: MOTHER’S MATERNAL-SISTER’S SON
1ST COUSIN-HALF: MOTHER’S MATERNAL-SISTER’S SON
1ST COUSIN-HALF: MOTHER’S PATERNAL-SISTER’S SON
1ST COUSIN-HALF: MOTHER’S PATERNAL-SISTER’S SON
1ST COUSIN 1X REMOVED A: MOTHER’S SISTER’S DAUGHTER’S SON 1ST COUSIN 1X REMOVED B: MOTHER’S MOTHER’S SISTER’S SON
1ST COUSIN 1X REMOVED A: MOTHER’S SISTER’S SON’S DAUGHTER 1ST COUSIN 1X REMOVED B: FATHER’S MOTHER’S SISTER’S SON
The winner confirmed with his mother this morning is:
GRAND UNCLE/AUNT-HALF: MOTHER’S FATHER’S MATERNAL-BRO
GRAND NEPHEW/NIECE-HALF: MATERNAL-BROTHER DAUGHTER SON
The cousin match is his half grand uncle. So its much easier to work with the people you match with when you can give them some possible relationship paths from their own perspective to work through. And obviously if my friend left DNA at a crime scene it would be curtains for him! I’m excited about how much XDNA opens the door to new discoveries and I appreciate your articles so much!