rgwas

GWAS sommer r2 scores



I am trying to get the r2 values for each marker in a GWAS using the GWAS function in the r package "sommer". From the documentation I see they should be in the object mix1$scores: scores A dataframe with as many columns as markers analyzed and 5 rows containingthe following:beta: marker effects.score: marker scores (-log_10p) for the traits.Fstat: F-statistic associated to the test.R2: R2 value for each marker.R2s: R2 value for each marker scaled

However, in my model, only marker scores are listed.

Example:

 library(sommer)
    data(DT_cpdata)
    DT <- DT_cpdata
    MP <- MP_cpdata
     #### create the variance-covariance matrix 
    A <- A.mat(GT) # additive relationship matrix# 
    #### look at the data and fit the model
    head(DT)
    mix1 <- GWAS(color~1,
                 random=~vs(id,Gu=A)
                + Rowf + Colf,
                 rcov=~units,
                data=DT,
                 M=GT, gTerm = "u:id") 
    mix1$scores

Solution

  • the GWAS function was refactored to use C++ code starting from 4.1.2 and some additional metrics like r2 were removed from the output. Those additional metrics will be brought back for 4.1.3. On the meantime, you can always go back to versions 4.1.1 or older to get that metric.

    Cheers, Eduardo