Conversation
XingerTang
left a comment
There was a problem hiding this comment.
All looks good to me!
|
Hi @gregorgorjanc , I think what you obtained from the called haplotypes, phased genotype probabilities, and (unphased) genotype probabilities are all expected. The The phased genotype probabilities and (unphased) genotype probabilities outputs are expected because we chose to use two states of a pair of regular chromosomes to represent one state of the X chromosome. It is assumed to be read in a way that sums up the first and third rows and then compares the sum of the second and fourth rows for the phased genotype probabilities. While for the unphased, it simply mixed the middle two rows of the phased genotype probabilities together, so the same logic applies. We can create special output functions for the X chromosome for the genotype probabilities in the future to make it easier to interpret. The dosage does require further normalisation to make sense. For X chromosomes, the dosage is essentially the second row of the phased genotype probabilities. Because in the case of the X chromosome, we use the probability of two states to represent one state, its probability is split up into two parts. So the actual dosage should be two times the output. For the interpretation of the segregation probabilities of X chromosomes, we can look at the first two rows and get insight into which haplotype of the mother is inherited. |
|
@XingerTang thanks for looking into this. I have met with @AprilYUZhang today and it seems to me that if we change the penetrance function, then the phased genotype probs will change to just |
be02141 to
a35d3a2
Compare
|
Should we also add a section in the documentation for this example? |
Yes, but I did this already in #219, though I think you mean something more - can you elaborate? Perhaps expose that there is/will be X chr example? |
We have the description and illustration for the plain simple example in the Getting Started section (https://alphapeel.readthedocs.io/en/latest/get_started.html#an-example). I'm expecting maybe we can do something similar for the X chr example. |
|
We probably want to keep the Getting started section simple, so autosomal chr is fine there. We should think of somehow promoting these tiny examples more, particularly once we add X, Y, and mtDNA cases! Can you think of the best way for this @XingerTang? |
I have added a simple x_chr example in line with #199. It shows one issue with dosages (they are wrong for males, unless I have wrong tinyhouse? no, I pulled the most recent and still get the same results!) and one issue in the haplotype for one individual.
See the file
examples/simple_example_x/simple_true.txtfor the true X chromosome haplotypes and genotypes. You will have to also look atsimple_pedigree.txtin the directory to make sense of the example.I propose the following. @AprilYUZhang and @XingerTang can you please have a look at my changes
(I only formatted the docs)and if the example makes sense for X chromosome inheritance (with recombination here) and we get this merged in. Then we go and address the problem with the dosage and the odd 9 in haplotype in a separate issue. I suggest we leave thesimple_true.txtin the directory the way it is and then we polish it in the next issue.