Last updated: 2022-01-07
Checks: 6 1
Knit directory: CassavaArchitectureGP/
This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish
to commit the R Markdown file and build the HTML.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20210721)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version ee108a9. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Untracked files:
Untracked: code/MixedModelsFunctions.R
Untracked: data/phenotypePAGP2.rds
Unstaged changes:
Modified: analysis/PhenData.Rmd
Modified: analysis/index.Rmd
Modified: data/phenotypePAGP.RDS
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/PhenData.Rmd
) and HTML (docs/PhenData.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | ee108a9 | LucianoRogerio | 2021-10-15 | Update of the trials of a Breeding program per year |
html | ee108a9 | LucianoRogerio | 2021-10-15 | Update of the trials of a Breeding program per year |
Rmd | 5d56695 | LucianoRogerio | 2021-10-11 | Add of the First Branch height measure at 9 MAP and new table for the number of trials for each Institute |
html | 5d56695 | LucianoRogerio | 2021-10-11 | Add of the First Branch height measure at 9 MAP and new table for the number of trials for each Institute |
Rmd | 0d2341c | LucianoRogerio | 2021-09-09 | Small changes at writing |
html | 0d2341c | LucianoRogerio | 2021-09-09 | Small changes at writing |
Rmd | 1b63c8c | LucianoRogerio | 2021-07-28 | Add Home button to the PhenData html Page |
html | 1b63c8c | LucianoRogerio | 2021-07-28 | Add Home button to the PhenData html Page |
html | 2b49915 | LucianoRogerio | 2021-07-22 | Build site. |
Rmd | 7f7b622 | LucianoRogerio | 2021-07-22 | Update PhenDataRmd |
html | 7f7b622 | LucianoRogerio | 2021-07-22 | Update PhenDataRmd |
Rmd | 6d25535 | LucianoRogerio | 2021-07-22 | Update PhenDataRmd |
html | 6d25535 | LucianoRogerio | 2021-07-22 | Update PhenDataRmd |
Rmd | 3e1bc0d | LucianoRogerio | 2021-07-22 | PhenD update |
html | 3e1bc0d | LucianoRogerio | 2021-07-22 | PhenD update |
html | 7a63d40 | LucianoRogerio | 2021-07-22 | Build site. |
html | d25ce40 | LucianoRogerio | 2021-07-22 | Build site. |
Rmd | 73f4e1f | LucianoRogerio | 2021-07-22 | wflow_publish("analysis/PhenData.Rmd") |
html | ce3ca50 | LucianoRogerio | 2021-07-21 | Build site. |
Rmd | e7db3e0 | LucianoRogerio | 2021-07-21 | Publish the update 1 Phenotypic data CassavaArchitectureGP |
Wrong section? get back to home.
Initialy we are going to download phenotypic data from Cassavabase. In this case we are going to download the data from traits related to plant Architecture, as the following table:
Trait | Abbreviation | Cassavabase code | Description |
---|---|---|---|
plant architecture visual rating 1-5 | PlantArchitecture | CO_334:0000099 | Plant architecture on a 1-5 scale with 1 = excellent, 2 good, 3 = fair, 4 = bad, and 5 = very bad |
plant architecture visual rating 1-5 at month 8 | PlantArchitecture8m | COMP:0000119 | Plant architecture on a 1-5 scale with 1 = excellent, 2 good, 3 = fair, 4 = bad, and 5 = very bad |
flowering ability visual assessment 0-3 | FlowerVisRate | CO_334:0000233 | Presence of flowers (0=none; 1=little; 2=intermediate; 3=many). |
flower visual rating 0 & 1 | FlowerPresence | CO_334:0000111 | Visual rating of flowers (50%) in plant with 0 = absent and 1 = present. |
initial plant vigor assessment 1-5 | VigorCIAT | CO_334:0000220 | Visual assessment of plant vigor during establishment (1=very little vigor, and 5 = very vigorous). as being evaluated by CIAT. |
initial vigor assessment 1-7 | Vigor | CO_334:0000009 | Visual assessment of plant vigor during establishment scored one month after planting. 3 = Not vigorous, 5 = Medium vigor, 7 = highly vigorous. |
number of forks counting | NFC | CO_334:0000146 | Number of branches (2 forks/branches (dichotomous), 3 forks/branches (trichotomous), or 4 forks/branches (tetrachotomous)) at every branching level. |
number of forks on branching level 1 counting | NFC1 | CO_334:0000522 | Number of forks (2 forks/branches (dichotomous), 3 forks/branches (trichotomous), or 4 forks/branches (tetrachotomous)) on the first branching level. |
number of forks on branching level 2 counting | NFC2 | CO_334:0000523 | Number of forks (2 forks/branches (dichotomous), 3 forks/branches (trichotomous), or 4 forks/branches (tetrachotomous)) on the second branching level. |
number of forks on branching level 3 counting | NFC3 | CO_334:0000524 | Number of forks (2 forks/branches (dichotomous), 3 forks/branches (trichotomous), or 4 forks/branches (tetrachotomous)) on the third branching level. |
number of nodes at branching level 1 counting | NNC1 | CO_334:0000352 | Number of nodes at the first branching level. |
number of nodes at branching level 2 counting | NNC2 | CO_334:0000363 | Number of nodes at the second branching level. |
number of nodes at branching level 3 counting | NNC3 | CO_334:0000368 | Number of nodes at the third branching level. |
first apical branch height measurement in cm | FirstBranchHeight | CO_334:0000106 | Height of first apical branch (ground level to point of first Apical branch, 9 months after planting) in cm |
plant height measurement in cm | PlantHeight | CO_334:0000018 | Vertical height of plants from the ground to top of the canopy measured in centimeter (cm). |
plant height measurement in cm at month 12 | PlantHeight12m | COMP:0000181 | Vertical height of plants from the ground to top of the canopy measured in centimeter (cm). |
plant height with leaf in cm | PlantHeightLeaf | CO_334:0000123 | Portion of the stem with leaves measured as the distance in centimeter from the point of attachment of the oldest leaf to the youngest leaf (apical leaf portion). |
plant height without leaf | PlantHeightNLeaf | CO_334:0000125 | Portion of stem with no leaf measured in centimeter (cm) by deducting plant height with leaf from plant height. |
plant height without leaf at month 12 | PlantHeightNLeaf12m | COMP:0000182 | Portion of stem with no leaf measured in centimeter (cm) by deducting plant height with leaf from plant height. |
stalk length evaluation | StalkLength | CO_334:0000227 | Visual assessment of the average length of the stalks (1=short; 2=intermediate; 3=long) |
stem diameter measurement in cm | StemDiam | CO_334:0000257 | Measurement of stem diameter taken on the middle of the plant in centimeter (cm) using the vernier caliper. |
stem diameter measurement in cm at month 5 | StemDiam5m | COMP:0000129 | Measurement of stem diameter taken on the middle of the plant in centimeter (cm) using the vernier caliper. |
stem diameter measurement in cm at month 6 | StemDiam6m | COMP:0000130 | Measurement of stem diameter taken on the middle of the plant in centimeter (cm) using the vernier caliper. |
Use the following filters:
TraitsLucianoGS
Trial Types
:
Years
from 2010 to 2021.trials
available at cassavabase after the filter.library(tidyverse); library(data.table); library(here)
RawPhenoData <- read.csv(file = here::here("data", "phenodata.csv"), header = T, na.strings = "")
RawPhenoData %>% mutate("FlowerPresence" = flower.visual.rating.0.1.CO_334.0000111,
"FlowerVisRate" = flowering.ability.visual.assessment.0.3.CO_334.0000233,
"VigorCIAT" = initial.plant.vigor.assessment.1.5.CO_334.0000220,
"Vigor" = initial.vigor.assessment.1.7.CO_334.0000009,
"PlantArchitecture" = plant.architecture.visual.rating.1.5.CO_334.0000099,
"PlantHeight" = plant.height.measurement.in.cm.CO_334.0000018,
"PlantHeight12m" = plant.height.measurement.in.cm.month.12.COMP.0000181,
"PlantHeightLeaf" = plant.height.with.leaf.in.cm.CO_334.0000123,
"PlantHeightNLeaf" = plant.height.without.leaf.CO_334.0000125,
"PlantHeightNLeaf12m" = plant.height.without.leaf.month.12.COMP.0000182,
"StalkLength" = stalk.length.evaluation.CO_334.0000227,
"StemDiam" = stem.diameter.measurement.in.cm.CO_334.0000257,
"FirstBranchHeight" = first.apical.branch.height.measurement.in.cm.CO_334.0000106,
.keep = "unused") %>% melt(data = .,
id.vars = c("studyYear", "programDbId", "programName", "programDescription",
"studyDbId", "studyName", "studyDesign", "plotWidth",
"plotLength", "fieldSize", "fieldTrialIsPlannedToBeGenotyped",
"fieldTrialIsPlannedToCross", "plantingDate", "harvestDate",
"locationDbId", "locationName", "germplasmDbId", "germplasmName",
"germplasmSynonyms", "observationLevel", "observationUnitDbId",
"observationUnitName", "replicate", "blockNumber", "plotNumber",
"rowNumber", "colNumber", "entryType", "plantNumber"),
variable.name = "Trait",
value.name = "Value") -> PhenoData
PhenoData2 <- PhenoData[!is.na(PhenoData$Value),]
saveRDS(object = PhenoData2, file = here::here("data", "phenotypePAGP.RDS"))
rm(list = ls())
suppressMessages(library(tidyverse)); library(reactable); library(here)
PhenoData <- readRDS(here("data","phenotypePAGP.RDS"))
PhenoData %>% dplyr::select(programName, studyYear, Trait, studyName) %>% unique() -> PhenoData2
Table2 <- table(PhenoData2$programName, PhenoData2$studyYear, PhenoData2$Trait) %>% as.data.frame()
colnames(Table2) <- c("programName", "Year", "Trait", "N˚Trials")
Table2 <- Table2[Table2$`N˚Trials`!=0,]
library(plyr)
source(here::here("code", "MixedModelsFunctions.R"))
PhenoData$check <- ifelse(PhenoData$entryType!="test", PhenoData$germplasmName, "999")
PhenoData$new <- ifelse(PhenoData$entryType == "test", 1, 0)
PhenoData$blockNumber <- as.character(PhenoData$blockNumber)
#PhenoData2 <- PhenoData[!PhenoData$studyName %in% BadTrialsList,]
#fmfit <- PhenoData2 %>% filter(Trait == "PlantArchitecture") %>% dlply(.variables = c("Trait", "studyName"),
# .fun = analyzeTrial.sommer)
The heritability and Reliability were estimated for each trial. We will proceed with the trails with reliability and heritability bigger than 0.2 and 0.1, respectively.
Select the trials with unexpected number of blocks, controls for their experimental design
PhenoData %>% dplyr::group_by(programName, studyYear, studyDesign, studyName) %>%
dplyr::summarise(n_blocks = length(unique(blockNumber)),
n_reps = length(unique(replicate)),
controls = length(unique(check))) -> TrialsInfo
`summarise()` has grouped output by 'programName', 'studyYear', 'studyDesign'. You can override using the `.groups` argument.
TrialsInfo %>% dplyr::filter((studyDesign %in% c("Augmented", "Alpha", "RCBD") & n_blocks == 1) |
(studyDesign == "Augmented" & controls == 1)) -> BadTrialsInfo
BadTrialsList <- BadTrialsInfo$studyName
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.6.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lme4_1.1-27.1 sommer_4.1.5 crayon_1.4.2 lattice_0.20-45
[5] MASS_7.3-54 Matrix_1.4-0 plyr_1.8.6 here_1.0.1
[9] reactable_0.2.3 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
[13] purrr_0.3.4 readr_2.1.1 tidyr_1.1.4 tibble_3.1.6
[17] ggplot2_3.3.5 tidyverse_1.3.1
loaded via a namespace (and not attached):
[1] httr_1.4.2 sass_0.4.0 jsonlite_1.7.2 splines_4.1.1
[5] modelr_0.1.8 bslib_0.3.1 assertthat_0.2.1 cellranger_1.1.0
[9] yaml_2.2.1 pillar_1.6.4 backports_1.4.1 glue_1.6.0
[13] digest_0.6.29 promises_1.2.0.1 minqa_1.2.4 rvest_1.0.2
[17] colorspace_2.0-2 htmltools_0.5.2 httpuv_1.6.5 reactR_0.4.4
[21] pkgconfig_2.0.3 broom_0.7.11 haven_2.4.3 scales_1.1.1
[25] whisker_0.4 later_1.3.0 tzdb_0.2.0 git2r_0.29.0
[29] generics_0.1.1 ellipsis_0.3.2 withr_2.4.3 cli_3.1.0
[33] magrittr_2.0.1 readxl_1.3.1 evaluate_0.14 fs_1.5.2
[37] fansi_0.5.0 nlme_3.1-153 xml2_1.3.3 tools_4.1.1
[41] hms_1.1.1 lifecycle_1.0.1 munsell_0.5.0 reprex_2.0.1
[45] compiler_4.1.1 jquerylib_0.1.4 rlang_0.4.12 nloptr_1.2.2.3
[49] grid_4.1.1 rstudioapi_0.13 htmlwidgets_1.5.4 crosstalk_1.2.0
[53] rmarkdown_2.11 boot_1.3-28 gtable_0.3.0 DBI_1.1.2
[57] R6_2.5.1 lubridate_1.8.0 knitr_1.37 fastmap_1.1.0
[61] utf8_1.2.2 workflowr_1.7.0 rprojroot_2.0.2 stringi_1.7.6
[65] Rcpp_1.0.7 vctrs_0.3.8 dbplyr_2.1.1 tidyselect_1.1.1
[69] xfun_0.29