Simulation major gene #61
Replies: 6 comments
-
@hosseinmehrban do you need just one major QTL? Then you can only specify 1 QTL when you define your trait. For example:
Another option is to simulate QTL effects from a gamma distribution - that will give you some major QTL and you can control the shape of that distribution with the shape argument. For example:
|
Beta Was this translation helpful? Give feedback.
-
Hi Gaynorr
First of all thanks so much
Imagine, a trait is controlled by 100 QTL which 1 QTL capture 20% additive
genetic variance, another QTL capture 10% additive genetic variance and
remains QTLs (98 QTL) capture 70% genetic variance (follow Gamma
distribution only for 98 QTL).
I don't know how to simulate these QTL in AlphaSimR?
Thanks so so much
Warm regards, Hossein
…On Tue, Jun 14, 2022 at 3:14 PM Gregor Gorjanc ***@***.***> wrote:
@hosseinmehrban <https://github.com/hosseinmehrban> do you need just one
major QTL? Then you can only specify 1 QTL when you define your trait. For
example:
founderGenomes = runMacs(nInd = 50, nChr = 2, segSites = 10, species = "CATTLE")
SP = SimParam$new(founderGenomes)
SP$addTraitA(nQtlPerChr = 1)
Another option is to simulate QTL effects from a gamma distribution - that
will give you some major QTL and you can control the shape of that
distribution with the shape argument. For example:
SP$addTraitA(fill-other-arguments, gamma = TRUE)
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKSARJKQH4D3LZGPOKPC24TVPBPAPANCNFSM5YKRKUSQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Animal Breeding and Genetics (Ph.D)
Department of Animal Science
Shahrekord University
Shahrekord, Iran,Postal code:88186-34141, P.O.Box: 115
Mobile: +98-915-320 6686
Mobile: +98-933-056 4001
Fax: +98-381-4424428
|
Beta Was this translation helpful? Give feedback.
-
@hosseinmehrban I suggest you start with the gamma distribution first and manipulate the shape parameter - check how much variance is captured by each QTL. I believe we could tweak QTL effects after they are simulated too, but haven't done it myself yet. @gaynorr any comments on this idea? |
Beta Was this translation helpful? Give feedback.
-
Dear Gaynorr
Thank you so much for your help.
warm regards, Hossein
…On Tue, Jun 14, 2022 at 4:08 PM Gregor Gorjanc ***@***.***> wrote:
@hosseinmehrban <https://github.com/hosseinmehrban> I suggest you start
with the gamma distribution first and manipulate the shape parameter -
check how much variance is captured by each QTL.
I believe we could tweak QTL effects after they are simulated too, but
haven't done it myself yet. @gaynorr <https://github.com/gaynorr> any
comments on this idea?
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKSARJNW4JCW34RTE4P7GBTVPBVKHANCNFSM5YKRKUSQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Animal Breeding and Genetics (Ph.D)
Department of Animal Science
Shahrekord University
Shahrekord, Iran,Postal code:88186-34141, P.O.Box: 115
Mobile: +98-915-320 6686
Mobile: +98-933-056 4001
Fax: +98-381-4424428
|
Beta Was this translation helpful? Give feedback.
-
Hi, @gaynorr can comment if the logic behind is correct...
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much.
On Tue, Oct 11, 2022 at 15:55 Ivan Pocrnic ***@***.***> wrote:
Hi,
you could also try playing with the modification of addEff slot with
whatever values you want, and then apply the changes and potentially
rescale the values. In the attached example I am simulating a trait
controlled by 5 QTLs, and for each, I will set the mean to 0 and values of
the effects to 100, 20, 20, 20, 20 (numbers mean nothing), and then I will
rescale for a trait to have mean 0 and variance of 1.
@gaynorr <https://github.com/gaynorr> can comment if the logic behind is
correct...
# Naive example for changing QTL Effects
rm(list = ls())
library(AlphaSimR)
founderPop = quickHaplo(nInd = 6, nChr = 1, segSites = 50)
SP = SimParam$new(founderPop)
SP$addTraitA(nQtlPerChr = 5)
# QTL effects before manual change
***@***.***
***@***.***
# How AlphaSimR creates GVs
((pullQtlGeno(founderPop) - 1) %*% ***@***.***)) + ***@***.***
# Manually change QTL effects:
trait1 = SP$traits[[1]]
# I'm using some arbitrary values here. Usually, you would sample effects from Normal or Gamma distribution
***@***.*** = 0
***@***.*** = c(100, 20, 20, 20, 20)
# Apply the changes
SP$switchTrait(lociMap = trait1, trait = 1)
# Check if effects changed
***@***.***
***@***.***
# Rescale magnitude of QTL effects and intercept for mean 0 and variance 1 in initial population
# Chris once told me this step is optional
SP$rescaleTraits(mean = 0, var = 1)
# Check if effects rescaled
***@***.***
***@***.***
# You continue with population creation and breeding...
# Set heritabilty
# This step after all (above) manual changes have been applied
SP$setVarE(h2 = 0.25)
pop = newPop(founderPop, simParam = SP)
gv(pop)
((pullQtlGeno(pop) - 1) %*% ***@***.***)) + ***@***.***
# etc.
—
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKSARJMNAAK6ZOAKG4A6R3DWCVMCRANCNFSM5YKRKUSQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Animal Breeding and Genetics (Ph.D)
Department of Animal Science
Shahrekord University
Shahrekord, Iran,Postal code:88186-34141, P.O.Box: 115
Mobile: +98-915-320 6686
Mobile: +98-933-056 4001
Fax: +98-381-4424428
|
Beta Was this translation helpful? Give feedback.
-
Dear GAYNOR
Hello
First of all, thanks so much for developing AlphaSimR software.
Would you mind guiding me on how to simulate a major gene using AlphasimR for a quantitative trait?
Warm regards, Hossein
Beta Was this translation helpful? Give feedback.
All reactions