Commit 67edcead authored by luroth's avatar luroth
Browse files

preparation for publication: minimal example added, code cleanup

parent d4be3808
......@@ -170,6 +170,7 @@ plot_heights <- ggplot(data = predicts) +
theme +
theme(legend.position = "bottom")
plot(plot_heights)
ggsave("./Graphs/1_Splines.png", plot_heights, width=8, height=5)
#-----------------------------------------------------------------------------------------------------------------
# Prepare plot based data in long format, values and se's
......@@ -210,10 +211,12 @@ df_for_plot <- df_for_plot %>% mutate(value_true = value, value = predict)
df_for_plot <- inner_join(df_for_plot, df_designs, by = c("plot.UID", "year_site.UID", "genotype.id"))
plot <- ggplot(data = df_for_plot,
aes(x = value, y = predict)) +
aes(x = value_true, y = predict)) +
geom_point() +
facet_wrap(parameter ~ year_site.UID, scales = "free")
facet_wrap(parameter ~ year_site.UID, scales = "free") +
theme
plot(plot)
ggsave("./Graphs/1_QMER.png", width=8)
#-----------------------------------------------------------------------------------------------------------------
##################################################################################################################
......@@ -221,7 +224,7 @@ plot(plot)
##################################################################################################################
df_all_params <- df_growth_phase_predicts_stage1 %>% mutate(value = predict)
df_all_params <- inner_join(df_all_params, df_designs, by = c("plot.UID", "year_site.UID", "genotype.id"))
df_all_params <- inner_join(df_all_params, df_designs, by = c("plot.UID"))
df_params_yearsite_weighted <- df_all_params %>%
mutate(year_site.UID_ = year_site.UID) %>%
......@@ -262,8 +265,10 @@ df_BLUES_validate <- inner_join(df_genotypes_true, df_BLUEs_weights, by = c("gen
plot <- ggplot(data = df_BLUES_validate, aes(value, predict)) +
geom_point() +
geom_abline(intercept = 0, slope = 1) +
facet_wrap(~parameter, scales = "free")
facet_wrap(~parameter, scales = "free") +
theme
plot(plot)
ggsave("./Graphs/1_BLUEs.png", width=8, height=4)
df_BLUES_validate %>%
group_by(parameter) %>%
......
......@@ -12,6 +12,10 @@ Roth et al. 2021 - Phenomics data processing: A plot-level model for repeated me
For a running minimal example see:
```Demo/1_Pspline_QMER_SpATS_asreml.R```
![](Graphs/1_Splines.png)
![](Graphs/1_QMER.png)
![](Graphs/1_BLUEs.png)
## Stage 1
P-spline and QMER method functions:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment