gdlc / BGLR-R

GNU General Public License v3.0
99 stars 68 forks source link

Model with fixed effects and pedigree #31

Closed volpatoo closed 5 years ago

volpatoo commented 5 years ago

I am trying to fit a model using the BGLR package in R. Unfortunately, I'had not success to do it. I would like to predict plant height using the following BGLR model (dataset with 2 sites, 50 genotypes with pedigree): yij = u + Ei + gi(A) + e yij = are the BLUEs from aerial data and ground data obtained by my "golden model" previously fitted in ASReml software (model with genotype, site, GxE interaction, repetition, and bloc - lattice design).
Ei= is the fixed effects for sites gi(A)= random effects for genotype with pedigree (A).

How can I fit a BGLR model using sites with fixed effects and genotype (random) with a pedigree? Could you please provide example in R using the BGLR scripts?

Thank you very much!

Cheers,

I attached the sample dataset (data_BLUEs) and the pedigree (calculated as twice the coefficient of parentage) as well. A.matrix.txt data.txt

Leonardo

volpatoo commented 5 years ago

I already figured out this, thanks for this excellent package.

gdlc commented 5 years ago

Thanks for you interest in BGLR!

On Tue, Jun 4, 2019 at 6:52 PM volpatoo notifications@github.com wrote:

I already figured out this, thanks for this excellent package.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gdlc/BGLR-R/issues/31?email_source=notifications&email_token=ABGQ3IVFPH64GHXIYQ52MA3PY3WZ7A5CNFSM4HQ4LYX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW6C54A#issuecomment-498872048, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGQ3IQYVNHC6DK222NXU3TPY3WZ7ANCNFSM4HQ4LYXQ .

wez078 commented 3 years ago

I am still struggle to incorporate fixed effects, with BGLR, I would like to add major QTL as fixed effect, not sure how can do this, Much appreciate for the help Sincerely wentao

gdlc commented 3 years ago

Just add to your linear predictor that. Suppose y has your phenotypes, X your markers, and z the major effect QTL, then run

X=as.matrix(X) W=as.matrix(W)

fm=BGLR(y=y,ETA=list( MRKS=list(X=X,model='BRR'), QTL=list(X=W,model='FIXED')) nIter=...)

If you are using a G or A matrix instead of markers directly, you can change MRKS=(X=X,model='BRR') with MRKS=(K=G,model='RKHS')

There are plenty of examples here

     https://github.com/gdlc/bglr-r

Don't forget to cite,

https://www.genetics.org/content/genetics/198/2/483.full.pdf

if you use BGLR in publications

Gustavo

On Fri, Jun 11, 2021 at 5:03 PM wez078 @.***> wrote:

I am still struggle to incorporate fixed effects, with BGLR, I would like to add major QTL as fixed effect, not sure how can do this, Much appreciate for the help Sincerely wentao

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gdlc/BGLR-R/issues/31#issuecomment-859909741, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGQ3IVS3GXX7VA6LZ7V7DTTSJ22HANCNFSM4HQ4LYXQ .

wez078 commented 3 years ago

Dear Gustavo: Many Thanks for your help, I tried, it worked out, for sure, will cite your 2014 paper in Genetics (BGLR) for our FHB genomics prediction MS

Just say, Many Thanks again

Sincerely wentao

On Sun, Jun 13, 2021 at 7:58 AM Gustavo de los Campos < @.***> wrote:

Just add to your linear predictor that. Suppose y has your phenotypes, X your markers, and z the major effect QTL, then run

X=as.matrix(X) W=as.matrix(W)

fm=BGLR(y=y,ETA=list( MRKS=list(X=X,model='BRR'), QTL=list(X=W,model='FIXED')) nIter=...)

If you are using a G or A matrix instead of markers directly, you can change MRKS=(X=X,model='BRR') with MRKS=(K=G,model='RKHS')

There are plenty of examples here

https://github.com/gdlc/bglr-r

Don't forget to cite,

https://www.genetics.org/content/genetics/198/2/483.full.pdf

if you use BGLR in publications

Gustavo

On Fri, Jun 11, 2021 at 5:03 PM wez078 @.***> wrote:

I am still struggle to incorporate fixed effects, with BGLR, I would like to add major QTL as fixed effect, not sure how can do this, Much appreciate for the help Sincerely wentao

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gdlc/BGLR-R/issues/31#issuecomment-859909741, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABGQ3IVS3GXX7VA6LZ7V7DTTSJ22HANCNFSM4HQ4LYXQ

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gdlc/BGLR-R/issues/31#issuecomment-860215432, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUOLIGMNH75BI2OEHF532ZTTSS2Q7ANCNFSM4HQ4LYXQ .