Skip to content
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

Dominance #27

Open
3 tasks
daikitag opened this issue Jul 6, 2023 · 7 comments
Open
3 tasks

Dominance #27

daikitag opened this issue Jul 6, 2023 · 7 comments

Comments

@daikitag
Copy link
Collaborator

daikitag commented Jul 6, 2023

Dominance could be added to tstrait, as we obtain the genotype of individuals in the intermediate step of the simulation. We can let tstrait do:

  • 0 mutation: Nothing
  • 1 mutation: Add effect size + dominance effect
  • 2 mutation: Add effect size * 2

instead of simply adding effect size * number of causal mutations to the genetic values of individuals.

I assume that the following steps will be required:

  • Create a new function for simulating individuals with dominance, as the computational speed of tstrait will drop with dominance
  • Create DominanceModel to control how dominance effects are being simulated
  • Statistical test to test dominance
@daikitag
Copy link
Collaborator Author

Suggestions in #45

@daikitag
Copy link
Collaborator Author

The dominance model in AlphaSim https://acsess.onlinelibrary.wiley.com/doi/10.3835/plantgenome2016.02.0013 would be a good starting point of the model

@gregorgorjanc
Copy link
Member

@daikitag we have completely rehauled dominance approach - happy to talk more - this is current implementation https://cran.r-project.org/web/packages/AlphaSimR/vignettes/traits.pdf but that doc doesn't show all the details

@gregorgorjanc
Copy link
Member

But the basic logic from your initial post is correct. The challenge is how to sample domEffect compared to addEffect - there are some subtle points there with respect to inbreeding depression and heterosis.

@gregorgorjanc
Copy link
Member

To add - this is similar to other posts - one thing is sampling effects, another is applying them. If you focus on the application of some dominance effects then a user can provide the values or you can provide functionality to sample such effects.

@daikitag
Copy link
Collaborator Author

@gregorgorjanc Thank you very much for your prompt reply. I actually thoroughly read through the codes and architectures of AlphaSimR to learn about quantitative trait simulation before I began this research project, and I tried creating tstrait, such that it can do a similar thing as AlphaSimR to tree sequences.

I found "AlphaSimR uses a digenic dominance model for all ploidy levels due to its use of scaled dominance genotype dosages. This model was chosen because it provides consistency in user interface and internal coding regardless of ploidy level and it provides as a reasonable approximation for partial dominance in highly polygenic traits." to be very interesting to read, as the current codes only support dominance in diploid setting. If you do not mind, would it be possible for you to let me know how you have implemented it, or point out to the codes in AlphaSimR that does it? I'm not sure about how we can implement dominance for polyploids, and I really appreciate your help.

@gregorgorjanc
Copy link
Member

@daikitag happy to share

In https://cran.r-project.org/web/packages/AlphaSimR/vignettes/traits.pdf you will see section on Genotype dosage scaling and then Additive Effects and Dominance effects

For Genotype dosage scaling the table 1 in that PDF and eq 2 and 3 should be clear I think - let me know if not.

Then we apply the additive and dominance effects to scaled dosages eq 4 and 5, see table 2 example

Codewise see https://github.com/gaynorr/AlphaSimR/blob/695aef000a50061fcef36aad2d85f92b3db2aab5/src/getGv.cpp#L150C24-L150C29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants