Last updated: 2021-01-21

Checks: 7 0

Knit directory: TARI_2020GS/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

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(20201215) 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 ac1cf61. 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/
    Ignored:    data/.DS_Store

Untracked files:
    Untracked:  data/DatabaseDownload_2020Dec18/
    Untracked:  data/DatabaseDownload_2021Jan20/
    Untracked:  data/Report-DCas20-5629/DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629/Report_5629_Counts_Ref_Version6.csv
    Untracked:  data/Report-DCas20-5629/Report_5629_VCF_Ref_Version6.txt
    Untracked:  data/Report-DCas20-5629chr10_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr11_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr12_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr13_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr14_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr15_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr16_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr17_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr18_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr1_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr2_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr3_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr4_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr5_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr6_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr7_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr8_DCas20_5629.vcf.gz
    Untracked:  data/Report-DCas20-5629chr9_DCas20_5629.vcf.gz
    Untracked:  data/TARI 2016_TP_CLONES.csv
    Untracked:  output/AllIdentified_germplasmName_to_FullSampleName_matches_TARI_2021Jan21.csv
    Untracked:  output/BeagleLogs/
    Untracked:  output/DosageMatrix_DCas20_5629_EA_REFimputedAndFiltered.rds
    Untracked:  output/DosageMatrix_ImputationReferencePanel_StageVI_91119.rds
    Untracked:  output/DosageMatrix_TARI_2020Dec21.rds
    Untracked:  output/DosageMatrix_TARI_2021Jan21.rds
    Untracked:  output/GEBV_TARI_ModelA_2021Jan21.csv
    Untracked:  output/GETGV_TARI_ModelADE_2021Jan21.csv
    Untracked:  output/Kinship_AD_TARI_2020Dec21.rds
    Untracked:  output/Kinship_AD_TARI_2021Jan21.rds
    Untracked:  output/Kinship_A_TARI_2020Dec21.rds
    Untracked:  output/Kinship_A_TARI_2021Jan21.rds
    Untracked:  output/Kinship_D_TARI_2020Dec21.rds
    Untracked:  output/Kinship_D_TARI_2021Jan21.rds
    Untracked:  output/OnlyChosen_germplasmName_to_FullSampleName_matches_TARI_2021Jan21.csv
    Untracked:  output/TARI_CleanedTrialData_2021Jan21.rds
    Untracked:  output/TARI_ExptDesignsDetected_2021Jan21.rds
    Untracked:  output/chr10_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr10_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr10_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr10_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr10_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr10_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr10_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr11_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr11_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr11_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr11_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr11_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr11_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr11_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr12_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr12_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr12_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr12_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr12_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr12_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr12_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr13_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr13_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr13_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr13_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr13_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr13_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr13_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr14_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr14_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr14_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr14_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr14_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr14_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr14_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr15_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr15_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr15_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr15_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr15_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr15_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr15_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr16_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr16_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr16_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr16_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr16_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr16_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr16_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr17_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr17_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr17_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr17_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr17_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr17_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr17_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr18_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr18_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr18_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr18_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr18_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr18_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr18_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr1_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr1_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr1_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr1_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr1_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr1_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr1_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr2_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr2_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr2_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr2_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr2_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr2_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr2_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr3_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr3_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr3_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr3_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr3_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr3_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr3_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr4_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr4_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr4_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr4_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr4_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr4_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr4_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr5_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr5_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr5_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr5_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr5_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr5_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr5_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr6_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr6_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr6_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr6_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr6_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr6_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr6_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr7_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr7_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr7_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr7_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr7_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr7_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr7_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr8_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr8_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr8_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr8_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr8_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr8_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr8_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/chr9_DCas20_5629_EA_REFimputed.INFO
    Untracked:  output/chr9_DCas20_5629_EA_REFimputed.hwe
    Untracked:  output/chr9_DCas20_5629_EA_REFimputed.log
    Untracked:  output/chr9_DCas20_5629_EA_REFimputed.sitesPassing
    Untracked:  output/chr9_DCas20_5629_EA_REFimputed.vcf.gz
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.alleleToCount
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.log
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.sitesWithAlleles
    Untracked:  output/chr9_DCas20_5629_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.alleleToCount
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.bed
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.bim
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.fam
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.log
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.nosex
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.raw
    Untracked:  output/chr9_ImputationReferencePanel_StageVI_91119.sitesWithAlleles
    Untracked:  output/cvresults_ADE_2021Jan21.rds
    Untracked:  output/cvresults_A_2021Jan21.rds
    Untracked:  output/genomicPredictions_ModelADE_twostage_TARI_2021Jan21.rds
    Untracked:  output/genomicPredictions_ModelA_twostage_TARI_2021Jan21.rds
    Untracked:  output/tari_blupsForModelTraining_twostage_asreml_2021Jan21.rds
    Untracked:  workflowr_log.R

Unstaged changes:
    Modified:   output/TARI_trials_NOT_identifiable.csv
    Modified:   output/maxNOHAV_byStudy.csv

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/01-cleanTPdata.Rmd) and HTML (docs/01-cleanTPdata.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 ac1cf61 wolfemd 2021-01-21 Kibaha samples added. Cross-validation and predictions redone.
html 5549754 wolfemd 2021-01-21 Build site.
Rmd bd635a2 wolfemd 2021-01-21 Customized and updated matching germplasmName to FullSampleName (GBS /
html abaf52a wolfemd 2020-12-23 Build site.
Rmd fae176a wolfemd 2020-12-23 Publish the first set of analyses and files for TARI 2020 GS.

Follow outlined GenomicPredictionChecklist and previous pipeline to process cassavabase data for ultimate genomic prediction.

Below we will clean and format training data.

  • Inputs: “Raw” field trial data
  • Expected outputs: “Cleaned” field trial data

[User input] Cassavabase download

Downloaded all TARI field trials.

  1. Cassavabase search wizard:
  2. Selected all TARI trials currently available. Make a list. Named it ALL_TARI_TRIALS_2021Jan20.
  3. Go to Manage –> Download here. Download phenotypes (plot-basis only) and meta-data as CSV using the corresponding boxes / drop-downs.
  4. Store flatfiles, unaltered in directory data/DatabaseDownload_2021Jan20/.
rm(list=ls())
library(tidyverse); library(magrittr);
source(here::here("code","gsFunctions.R"))

But first…. TARI seems to have a’lot of plant-basis data which I am not usually including.

indata<-read.csv(here::here("data/DatabaseDownload_2021Jan20","2021-01-20T203949phenotype_download.csv"),
                   na.strings = c("#VALUE!",NA,".",""," ","-","\""),
                   stringsAsFactors = F)
indata %>% count(observationLevel)
  observationLevel      n
1            plant 191079
2             plot  22978

Over 191K “plants” between 2018-2020.

The following printed studyNames have plant-basis data. They WILL NOT be included in subsequent analyses.

indata %>% filter(observationLevel=="plant") %$% unique(studyName)
 [1] "18CROSSING_BLOCK_TRIAL_MRK"     "19_ayt_iita_material_bunda"    
 [3] "19_ayt_iita_material_ukerewe"   "19_ayt_iita_material_Ukiriguru"
 [5] "2019_CBSD_IMMUNE_BUN"           "2019_CBSD_IMMUNE_UKE"          
 [7] "2019_CBSD_IMMUNE_UKGR"          "2019_NPT_UKE_TZ"               
 [9] "2019_NPT_UKG_5CP"               "2019_NPT_UKG_TZ"               
[11] "2019_UYT_BUN"                   "2019_UYT_BWA"                  
[13] "2019_UYT_UKE"                   "2019_UYT_UKG"                  
[15] "2020_AYT2_BUN"                  "2020AYT2BWANGA"                
[17] "2020_AYT2_UKE"                  "2020_AYT2_UKG"                 
[19] "2020_AYT3_BUN"                  "2020AYT3BWANGA"                
[21] "2020_AYT3_UKE"                  "2020_AYT3_UKG"                 
[23] "2020_AYT_IITA_BUN"              "2020_AYT_IITA_CHATO"           
[25] "2020_AYT_IITA_UKE"              "2020_AYT_IITA_UKG"             
[27] "2020_AYT_TP_BUN"                "2020_AYT_TP_BW"                
[29] "2020_AYT_TP_KAS"                "2020_AYT_TP_UKE"               
[31] "2020_AYT_TP_UKG"                "2020_CBSD_IMMUNE_BUN"          
[33] "2020_CBSD_IMMUNE_UKE"           "2020_CBSD_IMMUNE_UKG"          
[35] "2020_GWAS_BUNDA"                "2020_GWAS_CHAMBEZI_TRIAL"      
[37] "2020_GWAS_Ukerewe"              "2020_GWAS_UKIRIGURU"           
[39] "2020_GxE_ILO"                   "2020_GxE_KBH"                  
[41] "2020_GxE_UKG"                   "2020_PYT_NMKS1_BUN"            
[43] "2020_PYT_NMKS1_KAS"             "2020_PYT_NMKS1_KIS"            
[45] "2020_PYT_NMKS1_UKG"             "2020_PYT_NMKxAR37-80_BUN"      
[47] "2020_PYT_NMKxAR37-80_KAS"       "2020_PYT_NMKxAR37-80_UKG"      
[49] "2020_uyt1A_GAIRO"               "2020_UYT_BUN"                  
[51] "2020_UYT_BW"                    "2020_UYT_UKE"                  
[53] "2020_UYT_UKG"                   "GXE KIBAHA"                    
[55] "MULTILOCATIONAL_EZ_TP2"         "NGTZ18KBH_AYT1"                
[57] "NGTZ18KBH_AYT3"                 "NGTZ18KBH_AYT4"                
[59] "NGTZ18KBH_AYT5"                 "NGTZ18KBH_AYT6"                
[61] "pyt_2018"                      

Read DB data directly from the Cassavabase FTP server.

rm(indata);
dbdata<-readDBdata(phenotypeFile = here::here("data/DatabaseDownload_2021Jan20","2021-01-20T203949phenotype_download.csv"),
                   metadataFile = here::here("data/DatabaseDownload_2021Jan20","2021-01-20T174234metadata_download.csv"))

Before proceeding, the 2019 seedling nursery….

dbdata %>% 
  filter(studyName=="19_C1_GS_Seedling_Nursery_Chambezi",
         germplasmName=="TZMRK180069") %>% 
  distinct(germplasmName,observationUnitName,plantNumber,plotNumber,observationUnitName) %>% 
  rmarkdown::paged_table()
snps5629<-readRDS(here::here("output","DosageMatrix_DCas20_5629_EA_REFimputedAndFiltered.rds"))
rownames(snps5629) %>% grep("TZMRK180069",., value = T, ignore.case = T)
 [1] "TARI0050_A04...TZMRK180069"         "TARI0050_A05...TZMRK180069"        
 [3] "TARI0050_B04...TZMRK180069"         "TARI0050_B05...TZMRK180069"        
 [5] "TARI0050_C04...TZMRK180069_15.5217" "TARI0050_C05...TZMRK180069"        
 [7] "TARI0050_D04...TZMRK180069"         "TARI0050_D05...TZMRK180069_5.5207" 
 [9] "TARI0050_E03...TZMRK180069"         "TARI0050_E04...TZMRK180069"        
[11] "TARI0050_E05...TZMRK180069"         "TARI0050_F03...TZMRK180069"        
[13] "TARI0050_F04...TZMRK180069"         "TARI0050_F05...TZMRK180069"        
[15] "TARI0050_G03...TZMRK180069_20.5222" "TARI0050_G04...TZMRK180069"        
[17] "TARI0050_G05...TZMRK180069_1.5203"  "TARI0050_H03...TZMRK180069"        
[19] "TARI0050_H04...TZMRK180069_10.5212"

Unfortunately, these don’t currently match. As of Jan 21, wrote to TARI team about this. Will proceed with prediction, but CBSD phenos for the GS C1 seedlings won’t be included at this time.

rm(snps5629); gc()
          used (Mb) gc trigger  (Mb) limit (Mb) max used  (Mb)
Ncells 1147732 61.3    2888658 154.3         NA  2072271 110.7
Vcells 4007928 30.6   61635754 470.3     102400 62660784 478.1
dbdata %<>% 
  mutate(locationName=ifelse(locationName=="bwanga","Bwanga",locationName),
         locationName=ifelse(locationName=="kasulu","Kasulu",locationName))

Group and select trials to analyze

Make TrialType Variable

dbdata<-makeTrialTypeVar(dbdata) 
dbdata %>% 
  count(TrialType) %>% rmarkdown::paged_table()

Trials NOT included

Looking at the studyName’s of trials getting NA for TrialType, which can’t be classified at present.

Here is the list of trials I am not including.

dbdata %>% filter(is.na(TrialType)) %$% unique(studyName) %>% 
  write.csv(.,file = here::here("output","TARI_trials_NOT_identifiable.csv"), row.names = F)

Wrote to disk a CSV in the output/ sub-directory.

Should any of these trials have been included?

dbdata %>% 
  filter(is.na(TrialType)) %$% unique(studyName)
 [1] "17uytbwanga"                        "18_CBSD_IMMUNE"                    
 [3] "18_NAMIKONGA_S1"                    "18_NMKxAR37-80"                    
 [5] "19_C1_GS_Seedling_Nursery_Chambezi" "2020_AYT_TP_BW"                    
 [7] "2020_CBSD_IMMUNE_BUN"               "2020_CBSD_IMMUNE_UKE"              
 [9] "2020_CBSD_IMMUNE_UKG"               "2020_GWAS_BUNDA"                   
[11] "2020_GWAS_Ukerewe"                  "2020_GWAS_UKIRIGURU"               
[13] "2020_GxE_UKG"                       "2020_UYT1C_GAIRO"                  
[15] "95_iita_tz_materials"               "ACCESSION FOR GENOTYPING"          
[17] "bunda 2018"                         "CET_1_2016"                        
[19] "GXE KIBAHA"                         "IITA GENOTYPING  PLATE"            
[21] "ilonga_trial"                       "KIBAHA GERMPLASM"                  
[23] "local_germplam_Southern"            "Local_germplasm_eastern"           
[25] "Local_germplasm_islands"            "local_germplasm_northern"          
[27] "Local_germplasm_Nothern"            "Local_germplasm_SMS"               
[29] "LOCAL VARIETIES"                    "MULTILOCATIONAL_EZ_TP2"            
[31] "NDL_OP_UK"                          "NEW_LOCAL_GERMPLASM_UKIRIGURU"     
[33] "NGTZ18KBH_AYT5"                     "NGTZ18KBH_SEEDLING"                
[35] "NGTZ_CBSDIMMUNE_16VAR_CHAMBZ"       "NGTZKBH-2018-19-UYT2"              
[37] "Old_local_germplasm_ukiriguru"      "QC_CET_1"                          
[39] "QC_CET_2"                           "QC_PYT"                            
[41] "Seedlings_Kibaha"                   "TARI KIBAHA GERMPLASM"             

Include (by request) the “19_C1_GS_Seedling_Nursery_Chambezi”.

dbdata %<>% 
  mutate(TrialType=ifelse(studyName=="19_C1_GS_Seedling_Nursery_Chambezi","SeedlingNursery",TrialType))

Remove unclassified trials

dbdata %<>% 
    filter(!is.na(TrialType)) 
dbdata %>% 
    group_by(programName) %>% 
    summarize(N=n()) %>% rmarkdown::paged_table()
#   18591   (now including a ~5K plot seedling nursery) plots

Making a table of abbreviations for renaming

traitabbrevs<-tribble(~TraitAbbrev,~TraitName,
        "CMD1S","cassava.mosaic.disease.severity.1.month.evaluation.CO_334.0000191",
        "CMD3S","cassava.mosaic.disease.severity.3.month.evaluation.CO_334.0000192",
        "CMD6S","cassava.mosaic.disease.severity.6.month.evaluation.CO_334.0000194",
        "CMD9S","cassava.mosaic.disease.severity.9.month.evaluation.CO_334.0000193",
        "CBSD3S","cassava.brown.streak.disease.leaf.severity.3.month.evaluation.CO_334.0000204",
        "CBSD6S","cassava.brown.streak.disease.leaf.severity.6.month.evaluation.CO_334.0000205",
        "CBSD9S","cassava.brown.streak.disease.leaf.severity.9.month.evaluation.CO_334.0000206",
        "CBSDRS","cassava.brown.streak.disease.root.severity.12.month.evaluation.CO_334.0000201",
        #"CGM","Cassava.green.mite.severity.CO_334.0000033",
        "CGMS1","cassava.green.mite.severity.first.evaluation.CO_334.0000189",
        "CGMS2","cassava.green.mite.severity.second.evaluation.CO_334.0000190",
        "DM","dry.matter.content.by.specific.gravity.method.CO_334.0000160",
      # "DM","dry.matter.content.percentage.CO_334.0000092",
        "PLTHT","plant.height.measurement.in.cm.CO_334.0000018",
        "BRNHT1","first.apical.branch.height.measurement.in.cm.CO_334.0000106",
        "SHTWT","fresh.shoot.weight.measurement.in.kg.per.plot.CO_334.0000016",
        "RTWT","fresh.storage.root.weight.per.plot.CO_334.0000012",
        "RTNO","root.number.counting.CO_334.0000011",
        "TCHART","total.carotenoid.by.chart.1.8.CO_334.0000161",
        "NOHAV","plant.stands.harvested.counting.CO_334.0000010")
traitabbrevs %>% rmarkdown::paged_table()
# dbdata %>% colnames(.) %>% grep("fresh.root",.,value=T)
# dbdata$cassava.green.mite.severity.first.evaluation.CO_334.0000189 %>% summary

Run function renameAndSelectCols() to rename columns and remove everything unecessary

dbdata<-renameAndSelectCols(traitabbrevs,indata=dbdata,customColsToKeep = c("TrialType","observationUnitName"))

QC Trait values

dbdata<-dbdata %>% 
  mutate(#CMD1S=ifelse(CMD1S<1 | CMD1S>5,NA,CMD1S),
         CMD3S=ifelse(CMD3S<1 | CMD3S>5,NA,CMD3S),
         CMD6S=ifelse(CMD6S<1 | CMD6S>5,NA,CMD6S),
         CMD9S=ifelse(CMD9S<1 | CMD9S>5,NA,CMD9S),
         CBSD3S=ifelse(CBSD3S<1 | CBSD3S>5,NA,CBSD3S),
         CBSD6S=ifelse(CBSD6S<1 | CBSD6S>5,NA,CBSD6S),
         CBSD9S=ifelse(CBSD9S<1 | CBSD9S>5,NA,CMD9S),
         CBSDRS=ifelse(CBSDRS<1 | CBSDRS>5,NA,CBSDRS),
         #CGM=ifelse(CGM<1 | CGM>5,NA,CGM),
         CGMS1=ifelse(CGMS1<1 | CGMS1>5,NA,CGMS1),
         CGMS2=ifelse(CGMS2<1 | CGMS2>5,NA,CGMS2),
         DM=ifelse(DM>100 | DM<=0,NA,DM),
         RTWT=ifelse(RTWT==0 | NOHAV==0 | is.na(NOHAV),NA,RTWT),
         SHTWT=ifelse(SHTWT==0 | NOHAV==0 | is.na(NOHAV),NA,SHTWT),
         RTNO=ifelse(RTNO==0 | NOHAV==0 | is.na(NOHAV),NA,RTNO),
         NOHAV=ifelse(NOHAV==0,NA,NOHAV),
         NOHAV=ifelse(NOHAV>42,NA,NOHAV),
         RTNO=ifelse(!RTNO %in% 1:10000,NA,RTNO))

Post-QC traits

Harvest index

dbdata<-dbdata %>% 
    mutate(HI=RTWT/(RTWT+SHTWT))

Unit area traits

I anticipate this will not be necessary as it will be computed before or during data upload.

For calculating fresh root yield:

  1. PlotSpacing: Area in \(m^2\) per plant. plotWidth and plotLength metadata would hypothetically provide this info, but is missing for vast majority of trials. Therefore, use info from Fola.
  2. maxNOHAV: Instead of ExpectedNOHAV. Need to know the max number of plants in the area harvested. For some trials, only the inner (or “net”) plot is harvested, therefore the PlantsPerPlot meta-variable will not suffice. Besides, the PlantsPerPlot information is missing for the vast majority of trials. Instead, use observed max(NOHAV) for each trial. We use this plus the PlotSpacing to calc. the area over which the RTWT was measured. During analysis, variation in the actual number of plants harvested will be accounted for.
dbdata<-dbdata %>% 
    mutate(PlotSpacing=ifelse(programName!="IITA",1,
                              ifelse(studyYear<2013,1,
                              ifelse(TrialType %in% c("CET","GeneticGain","ExpCET"),1,0.8))))
maxNOHAV_byStudy<-dbdata %>% 
  group_by(programName,locationName,studyYear,studyName,studyDesign) %>% 
  summarize(MaxNOHAV=max(NOHAV, na.rm=T)) %>% 
  ungroup() %>% 
  mutate(MaxNOHAV=ifelse(MaxNOHAV=="-Inf",NA,MaxNOHAV))

write.csv(maxNOHAV_byStudy %>% arrange(studyYear),file=here::here("output","maxNOHAV_byStudy.csv"), row.names = F)
# I log transform yield traits 
# to satisfy homoskedastic residuals assumption 
# of linear mixed models
dbdata<-left_join(dbdata,maxNOHAV_byStudy) %>% 
  mutate(RTWT=ifelse(NOHAV>MaxNOHAV,NA,RTWT),
         SHTWT=ifelse(NOHAV>MaxNOHAV,NA,SHTWT),
         RTNO=ifelse(NOHAV>MaxNOHAV,NA,RTNO),
         HI=ifelse(NOHAV>MaxNOHAV,NA,HI),
         FYLD=RTWT/(MaxNOHAV*PlotSpacing)*10,
         DYLD=FYLD*(DM/100),
         logFYLD=log(FYLD),
         logDYLD=log(DYLD),
         logTOPYLD=log(SHTWT/(MaxNOHAV*PlotSpacing)*10),
         logRTNO=log(RTNO),
         PropNOHAV=NOHAV/MaxNOHAV) 
# remove non transformed / per-plot (instead of per area) traits
dbdata %<>% select(-RTWT,-SHTWT,-RTNO,-FYLD,-DYLD)

Season-wide mean disease severity

dbdata<-dbdata %>% 
  mutate(MCMDS=rowMeans(.[,c("CMD3S","CMD6S","CMD9S")], na.rm = T),
         MCBSDS=rowMeans(.[,c("CBSD3S","CBSD6S","CBSD9S")], na.rm = T)) %>% 
  select(-CMD3S,-CMD6S,-CMD9S,-CBSD3S,-CBSD6S,-CBSD9S)

[User input] Assign genos to phenos

I customized this step for TARI.

Match “germplasmName” from TARI phenotyping trials to “FullSampleName” from TARI GBS and DArT genotyping data.

Uses 2 flat files, which are available e.g. here. Specifically, IITA_GBStoPhenoMaster_33018.csv, GBSdataMasterList_31818.csv. I copy them to the data/ sub-directory for the current analysis. In addition, DArT-only samples are now expected to also have phenotypes. Therefore, checking for matches in new flatfiles, deposited in the data/ (see code below).

library(tidyverse); library(magrittr)

# Distinct "germplasmName" identifying clones in TARI phenotyping plots
tzgermnames<-dbdata %>% 
  distinct(germplasmName)

  # 1) Match TARI samples where germplasmName is prefixed with TZ, but FullSampleName
phenos2genos<-tzgermnames %>% 
  mutate(germplasmSynonyms=ifelse(grepl("^TZ",germplasmName,
                                        ignore.case = T),
                                  gsub("TZ","",germplasmName),germplasmName)) %>% 
  left_join(read.csv(here::here("data","GBSdataMasterList_31818.csv"), 
                     stringsAsFactors = F) %>% 
              select(DNASample,FullSampleName) %>% 
              rename(germplasmSynonyms=DNASample)) %>%  
  # 2) Match additional samples based on genotyping done by IITA and NaCRRI:
  ## IITA
  bind_rows(tzgermnames %>%
              left_join(read.csv(here::here("data","IITA_GBStoPhenoMaster_33018.csv"),
                                 stringsAsFactors = F))) %>% 
  ## NaCRRI
  bind_rows(tzgermnames %>%
              mutate(germplasmSynonyms=ifelse(grepl("^UG",germplasmName,ignore.case = T),
                                              gsub("UG","Ug",germplasmName),germplasmName)) %>%
              left_join(read.csv(here::here("data","GBSdataMasterList_31818.csv"),
                                 stringsAsFactors = F) %>%
                          select(DNASample,FullSampleName) %>%
                          rename(germplasmSynonyms=DNASample)))
phenos2genos %>% filter(!is.na(FullSampleName)) %>% distinct(germplasmName) %>% nrow(.) # [1] 435
[1] 435
# Only about half the germplasmName we expect

Only about half the ~834 germplasmName we expect to correspond to the clones from Ukiriguru and Kibaha.

At this point, I realized the Kibaha samples are missing.

The solution is in the code below. It required some staring at names. Heneriko supplied a list from the 2016 predictions (see: data/TARI 2016_TP_CLONES.csv), which was helpful.

phenos2genos %<>% 
  bind_rows(tzgermnames %>% 
              mutate(germplasmSynonyms=gsub("^TZ","",germplasmName),
                     germplasmSynonyms=gsub("HS","_",germplasmSynonyms),
                     germplasmSynonyms=gsub("FS","_",germplasmSynonyms)) %>% 
              left_join(read.csv(here::here("data","GBSdataMasterList_31818.csv"), 
                                 stringsAsFactors = F) %>% 
                          select(DNASample,FullSampleName) %>% 
                          rename(germplasmSynonyms=DNASample) %>% 
                          filter(grepl("^KBH",germplasmSynonyms)) %>% 
                          mutate(germplasmSynonyms=gsub("KBH2012","KBH12",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2013","KBH13",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2014","KBH14",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2015","KBH15",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2016","KBH16",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2017","KBH17",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2018","KBH18",germplasmSynonyms),
                                 germplasmSynonyms=gsub("KBH2019","KBH19",germplasmSynonyms))))
phenos2genos %<>% 
  filter(!is.na(FullSampleName)) %>% 
  distinct(germplasmName,FullSampleName)

phenos2genos %>% distinct(germplasmName) %>% nrow(.) # [1] 914
[1] 914

Now there are 914 germplasmName-FullSampleName matches.

For both the “germplasmName” and the “FullSampleName” lists, try matching by making everything upper case on both sides. There are many capitolization related issues I see. Examples:

  • germplasmName == “LIONGOKWIMBA”, FullSampleName == “Liongokwimba”
  • germplasmName == “kiroba”, FullSampleName == “KIROBA”
  • germplasmName == “Mkumba”, FullSampleName == “MKUMBA”

But also, e.g.:

  • germplasmName == “TZ-130”, FullSampleName == “TZ_130”
phenos2genos %<>% 
  bind_rows(tzgermnames %>% 
  anti_join(phenos2genos) %>%
  mutate(germplasmSynonyms=toupper(germplasmName),
         germplasmSynonyms=gsub("-","_",germplasmSynonyms)) %>% 
  left_join(read.csv(here::here("data","GBSdataMasterList_31818.csv"), 
                                 stringsAsFactors = F) %>% 
                          select(DNASample,FullSampleName) %>% 
                          rename(germplasmSynonyms=DNASample) %>% 
                          mutate(germplasmSynonyms=toupper(germplasmSynonyms),
                                 germplasmSynonyms=gsub("-","_",germplasmSynonyms)))) %>% 
  filter(!is.na(FullSampleName)) %>% 
  distinct(germplasmName,FullSampleName)

phenos2genos %>% distinct(germplasmName) %>% nrow(.) # [1] 921 .... not an awesome improvement
[1] 921

Next, and last but not least, need to check for matches with the new germplasm genotyped only by DArTseqLD (DCas20_5629). Based on the check I did above, this is not currently possible, so skip.

germNamesWithoutGBSgenos<-tzgermnames %>%
  anti_join(phenos2genos)
germNamesWithoutGBSgenos %>% nrow() # [1] 2938
[1] 2938

Select one genotype record (FullSampleName) per unique clone (germplasmName)

genosChosenForPhenos<-phenos2genos %>% 
  group_by(germplasmName) %>% 
  slice(1) %>% ungroup()
print(paste0(nrow(genosChosenForPhenos)," germNames with GBS geno. records"))
[1] "921 germNames with GBS geno. records"
dbdata %<>% 
    left_join(genosChosenForPhenos) 

# Create a new identifier, GID
## Equals the value SNP data name (FullSampleName) 
## else germplasmName if no SNP data
## [FOR TARI] if studyName=="19_C1_GS_Seedling_Nursery_Chambezi", GID should be the "observationUnitName"
dbdata %<>% 
  mutate(GID=ifelse(is.na(FullSampleName),
                    ifelse(studyName=="19_C1_GS_Seedling_Nursery_Chambezi",
                           observationUnitName,germplasmName),
                    FullSampleName))

Write lists for matching genos-to-phenos

# snps_refpanel<-readRDS(here::here("output","DosageMatrix_ImputationReferencePanel_StageVI_91119.rds"))
# snps5629<-readRDS(here::here("output","DosageMatrix_DCas20_5629_EA_REFimputedAndFiltered.rds"))
# rownames(snps_refpanel) %>% 
#     write.csv(.,file = here::here("output","rownames_DosageMatrix_ImputationReferencePanel_StageVI_91119.csv"), row.names = F)
# rownames(snps5629) %>% 
#     write.csv(.,file = here::here("output","rownames_DosageMatrix_DCas20_5629_EA_REFimputedAndFiltered.csv"), row.names = F)
# rm(snps_refpanel,snps5629); gc()

write.csv(genosChosenForPhenos,
          file = here::here("output","OnlyChosen_germplasmName_to_FullSampleName_matches_TARI_2021Jan21.csv"), 
          row.names = F)

write.csv(phenos2genos,
          file = here::here("output","AllIdentified_germplasmName_to_FullSampleName_matches_TARI_2021Jan21.csv"), 
          row.names = F)

Output “cleaned” file

saveRDS(dbdata,file=here::here("output","TARI_CleanedTrialData_2021Jan21.rds"))

Detect experimental designs

The next step is to check the experimental design of each trial. If you are absolutely certain of the usage of the design variables in your dataset, you might not need this step.

Examples of reasons to do the step below:

  • Some trials appear to be complete blocked designs and the blockNumber is used instead of replicate, which is what most use.
  • Some complete block designs have nested, incomplete sub-blocks, others simply copy the “replicate” variable into the “blockNumber variable”
  • Some trials have only incomplete blocks but the incomplete block info might be in the replicate and/or the blockNumber column

One reason it might be important to get this right is that the variance among complete blocks might not be the same among incomplete blocks. If we treat a mixture of complete and incomplete blocks as part of the same random-effect (replicated-within-trial), we assume they have the same variance.

Also error variances might be heterogeneous among different trial-types (blocking scheme available) and/or plot sizes (maxNOHAV).

Start with cleaned data from previous step.

rm(list=ls()); gc()
          used (Mb) gc trigger  (Mb) limit (Mb) max used  (Mb)
Ncells 1141828 61.0    2888658 154.3         NA  2888658 154.3
Vcells 2243037 17.2   49308604 376.2     102400 62660784 478.1
library(tidyverse); library(magrittr);
source(here::here("code","gsFunctions.R"))
dbdata<-readRDS(here::here("output","TARI_CleanedTrialData_2021Jan21.rds"))
dbdata %>% head %>% rmarkdown::paged_table()

Detect designs

dbdata<-detectExptDesigns(dbdata)
dbdata %>% 
    count(programName,CompleteBlocks,IncompleteBlocks) %>% rmarkdown::paged_table()

Output file

saveRDS(dbdata,file=here::here("output","TARI_ExptDesignsDetected_2021Jan21.rds"))

Next step

  1. Get BLUPs combining all trial data: Combine data from all trait-trials to get BLUPs for downstream genomic prediction.
    • Fit mixed-model to multi-trial dataset and extract BLUPs, de-regressed BLUPs and weights. Include two rounds of outlier removal.

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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] magrittr_2.0.1  forcats_0.5.0   stringr_1.4.0   dplyr_1.0.3    
 [5] purrr_0.3.4     readr_1.4.0     tidyr_1.1.2     tibble_3.0.5   
 [9] ggplot2_3.3.3   tidyverse_1.3.0 workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.0  xfun_0.20         haven_2.3.1       colorspace_2.0-0 
 [5] vctrs_0.3.6       generics_0.1.0    htmltools_0.5.1   yaml_2.2.1       
 [9] rlang_0.4.10      later_1.1.0.1     pillar_1.4.7      withr_2.4.0      
[13] glue_1.4.2        DBI_1.1.1         dbplyr_2.0.0      modelr_0.1.8     
[17] readxl_1.3.1      lifecycle_0.2.0   cellranger_1.1.0  munsell_0.5.0    
[21] gtable_0.3.0      rvest_0.3.6       evaluate_0.14     knitr_1.30       
[25] httpuv_1.5.5      fansi_0.4.2       broom_0.7.3       Rcpp_1.0.6       
[29] promises_1.1.1    backports_1.2.1   scales_1.1.1      jsonlite_1.7.2   
[33] fs_1.5.0          hms_1.0.0         digest_0.6.27     stringi_1.5.3    
[37] rprojroot_2.0.2   grid_4.0.2        here_1.0.1        cli_2.2.0        
[41] tools_4.0.2       crayon_1.3.4      whisker_0.4       pkgconfig_2.0.3  
[45] ellipsis_0.3.1    xml2_1.3.2        reprex_0.3.0      lubridate_1.7.9.2
[49] assertthat_0.2.1  rmarkdown_2.6     httr_1.4.2        rstudioapi_0.13  
[53] R6_2.5.0          git2r_0.28.0      compiler_4.0.2