Biometris / statgenSTA

See https://biometris.github.io/statgenSTA for a full description
https://biometris.github.io/statgenSTA
4 stars 4 forks source link

How to get BLUEs when using check genotypes? #4

Closed hoerte closed 1 year ago

hoerte commented 1 year ago

Dear StatgenSTA,

I am using your package for analysing field data including check genotypes.

Create a TD object with the phenotypic data

td <- createTD(df, genotype = "genotype", trial = "field", loc = "field", year = "year", repId = "rep", subBlock = "block", rowCoord = "X", colCoord = "Y", checkId = "checkId", trDesign = "rcbd")

Fit mixed models with SpATS

m.SpATS <-fitTD(TD = td, traits = "trait", design = "rcbd", what = c("random"), useCheckId = T, spatial = T, engine = "SpATS")

When useCheckID = TRUE I only get the BLUPs because genotypes must be set random, but I would like get BLUEs for a GWAS analysis. Is there a solution that I can both use my check genotypes and extract the BLUEs? Thank you for your help!

Kind regards, Hannah

BartJanvanRossum commented 1 year ago

Dear Hannah,

When you want to use the BLUEs in your GWAS analysis, you want an adjusted mean for all of your genotypes, regardless of whether they were checks or not. You mainly want to correct for design effects, in your case for replicate, block and spatial effects. For this it is not necessary to treat your checks in a different way than the other genotypes.

For your data, fitting a model like the one below, should give you the BLUEs you need.

m.SpATS <-fitTD(TD = td, traits = "trait", design = "rcbd",
what = "fixed", spatial = TRUE, engine = "SpATS")

Best regards, Bart-Jan

hoerte commented 1 year ago

Dear Bart-Jan,

that makes sense - thank you a lot!

Best, Hannah