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

Flexibility to add extra slot #134

Open
mab658 opened this issue Apr 20, 2023 · 4 comments
Open

Flexibility to add extra slot #134

mab658 opened this issue Apr 20, 2023 · 4 comments

Comments

@mab658
Copy link

mab658 commented Apr 20, 2023

In the course of simulation, one may simulate genetic estimated total genetic value (GETGV) in addition to EBV. It is advisable to allow the user to be able to add extra slot so that such effect could be added to the population object.

@gregorgorjanc
Copy link
Contributor

@mab658 you could store this in the misc slot. See getMisc() and setMisc().

@gaynorr
Copy link
Owner

gaynorr commented Apr 20, 2023

I'd asked Moshood to post this here earlier. I probably won't act on in soon, but it is something I want to keep here as a potential future enhancement. I'm currently shoving everything through the EBV slot even if it isn't really and EBV. This expansion may also consider covering complex traits that are a function of multiple traits.

@gregorgorjanc
Copy link
Contributor

I hear you @gaynorr! I have been wondering the same myself! The question becomes what are all the slots we want/need!

gv (current slot) & egv (not a slot currently)

bv (not a slot currently and depends on the pop anyway) & ebv (current slot)

dd and aa as above for the bv

index trait? Should we have an option to define a trait that is a function of other traits and always comes at the end of the traits (say gv[, nTraits+1]) and we define such a mapping in the SP function? Or the finalisePop() function?

@gregorgorjanc
Copy link
Contributor

Recent change in the pop@misc slot will make this very easy for the users. See tests code at https://github.com/gaynorr/AlphaSimR/blob/69c30388e067ba4bf73192a1f0a4a446508b3afe/tests/testthat/test-misc.R on how to use pop@misc.

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

3 participants