-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marker effect mean value is calculated wrong? #6
Comments
Thanks for helping us improve ChromaX! That mean refers to the mean value of GEBV assuming the population is drawn from a uniform distribution on all possible individuals; i.e. every marker has an equal probability of having a value 0 or 1. The first axis in marker_effects is the marker axis; the second will be the number of traits. If you want to compute the mean of your current population, you should do something like this: gebvs = simulator.GEBV(population)
gebvs.mean(axis=0) Moreover, these values are only for the diploid population (see #1), I hope to have time to design it better soon. So with the previous assumptions, the mean of a random population will be the sum of the marker_effects as the summed markers values on the diploidy axis will have values 2 with 25% probability, 1 with 50% probability, and 0 with 25% probability. Does this make sense? Sorry for the confusion, I should make it clearer and maybe even private those values (I needed them for some of my experiments, but they are not very interesting for the user maybe). |
Oh, I see it now, and it is a bug indeed, thanks a lot @oddoking There are two different means defined in that class. One is a user-specified one, that should correctly be added to the dot product. The other is what I explained in my previous message and shouldn't be added; it is just something theoretical that I used for GEBV normalization. Can you check if #7 looks good for you? Thank you! A random TraitModel is also generated to simulate GxE effects to simulate phenotyping. If you don't use the phenotype function, you can ignore it |
@younik Thanks for responding. I am glad we are contributing. I had a look at your fix. I feel it is not complete. I will create a pull request later to show my thoughts. That would be the easy way for our discussion. Happy New Year~ |
Fixed by #7 |
In the TraitModel, the marker effect mean is summing all the marker effects along the n (pop size) dimension. I think it should use the mean function, not the sum function. I verified using our data whose mean is zero, but Chromax is summing the value. Also after taking the mean, the marker effect values should be subtracted by the mean so that when calculating GEBV, your code will be correct by adding back the mean.
The text was updated successfully, but these errors were encountered: