Last updated: 2020-10-09

Checks: 7 0

Knit directory: NaCRRI_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(20200826) 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 bcbcec3. 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:    .Rproj.user/
    Ignored:    analysis/.DS_Store
    Ignored:    data/.DS_Store

Untracked files:
    Untracked:  data/Report-DCas20-5419/
    Untracked:  output/BeagleLogs/
    Untracked:  output/DosageMatrix_DCas20_5419_EA_REFimputedAndFiltered.rds
    Untracked:  output/DosageMatrix_DCas20_5419_LA_REFimputedAndFiltered.rds
    Untracked:  output/chr10_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr10_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr10_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr10_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr10_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr10_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr10_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr10_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr10_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr10_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr11_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr11_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr11_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr11_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr11_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr11_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr11_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr11_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr11_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr11_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr12_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr12_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr12_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr12_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr12_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr12_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr12_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr12_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr12_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr12_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr13_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr13_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr13_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr13_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr13_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr13_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr13_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr13_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr13_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr13_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr14_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr14_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr14_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr14_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr14_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr14_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr14_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr14_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr14_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr14_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr15_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr15_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr15_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr15_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr15_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr15_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr15_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr15_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr15_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr15_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr16_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr16_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr16_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr16_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr16_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr16_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr16_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr16_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr16_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr16_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr17_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr17_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr17_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr17_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr17_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr17_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr17_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr17_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr17_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr17_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr18_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr18_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr18_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr18_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr18_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr18_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr18_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr18_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr18_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr18_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr1_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr1_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr1_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr1_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr1_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr1_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr1_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr1_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr1_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr1_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr2_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr2_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr2_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr2_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr2_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr2_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr2_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr2_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr2_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr2_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr3_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr3_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr3_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr3_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr3_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr3_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr3_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr3_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr3_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr3_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr4_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr4_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr4_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr4_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr4_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr4_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr4_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr4_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr4_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr4_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr5_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr5_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr5_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr5_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr5_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr5_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr5_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr5_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr5_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr5_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr6_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr6_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr6_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr6_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr6_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr6_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr6_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr6_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr6_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr6_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr7_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr7_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr7_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr7_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr7_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr7_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr7_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr7_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr7_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr7_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr8_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr8_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr8_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr8_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr8_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr8_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr8_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr8_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr8_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr8_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr9_DCas20_5419_EA_REFimputed.INFO
    Untracked:  output/chr9_DCas20_5419_EA_REFimputed.hwe
    Untracked:  output/chr9_DCas20_5419_EA_REFimputed.log
    Untracked:  output/chr9_DCas20_5419_EA_REFimputed.sitesPassing
    Untracked:  output/chr9_DCas20_5419_EA_REFimputed.vcf.gz
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.bed
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.bim
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.fam
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.log
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.nosex
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.raw
    Untracked:  output/chr9_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz
    Untracked:  output/chr9_DCas20_5419_EAplusLA_REFimputedAndFiltered.log
    Untracked:  output/chr9_DCas20_5419_LA_REFimputed.log
    Untracked:  output/chr9_DCas20_5419_LA_REFimputed.vcf.gz
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.bed
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.bim
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.fam
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.log
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.nosex
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.raw
    Untracked:  output/chr9_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz
    Untracked:  workflowr_log.R

Unstaged changes:
    Deleted:    EMBRAPA_2020GS.Rproj
    Deleted:    analysis/Imputation_EMBRAPA_102419.Rmd
    Deleted:    analysis/ImputeDCas20_5360.Rmd
    Deleted:    analysis/Verify_gbs2dart_sampleMatches_EMBRAPA_102419.Rmd
    Deleted:    analysis/convertDCas19_4403_ToVCF_102419.Rmd
    Deleted:    analysis/convertDCas20_5360_ToVCF.Rmd

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/Verify_gbs2dart_sampleMatches_82819.Rmd) and HTML (docs/Verify_gbs2dart_sampleMatches_82819.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
html c6022b6 wolfemd 2020-10-09 Build site.
Rmd 4f8a229 wolfemd 2020-10-09 Publish imputations for 2020 of DCAs20_5360 (and 2019 code too) for

Make a directory for output

# on cbsulm12
mkdir /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819

Input Parameters

library(tidyverse); library(magrittr)
dartvcfInput<-paste0("/workdir/mw489/DCas19_4459/SNP_4459_3822_4078_4433_VCF.csv")
dartcountsInput<-paste0("/workdir/mw489/DCas19_4459/SNPs_counts_V6_4459_3822_4078_4433.csv")
outName<-paste0("/workdir/mw489/DCas19_4459/DCas19_4459_82719")
nskipvcf<-2
nskipcounts<-3
ncores<-90 # using more than a few could be VERY memory intensive

Sample Lists

Matches we could get:

TARI TP NaCRRI C1/C2 parents

library(tidyverse); library(magrittr);
dcas4459samples<-read.table(file=paste0(outName,".samples"), stringsAsFactors = F, header = F)
dcas4459samples$V1 %>% 
  grep("TARI",.,value=T)
dcas4459samples$V1 %>% 
  grep("TARI",.,value=T,invert = T) %>% 
  grep("Full_sib_Nigeria",.,value = T,invert = T) %>% 
  grep("CycleOne|CycleTwo|GS_Cycle|UYT|RTB|Namulonge_C1",.,value = T,invert = T) %>% 
  grep("UG11|UG12|UG13|UG14",.,value = T, ignore.case = T,invert = T) %>% 
  grep("^UGC",.,value = T, ignore.case = T,invert = T)
system(paste0("bcftools query --list-samples ",
              "/workdir/mw489/June2016_VCF/cassavaGBSbuild_June2016_withRef_chr1.vcf.gz ",
              "> /workdir/mw489/June2016_VCF/cassavaGBSbuild_June2016_withRef_chr1.samples"))
system(paste0("bcftools query --list-samples ",
              "/workdir/mw489/TanzaniaData_June2017/vcfFIles/TanzaniaData_20170601_withRef_chr1.vcf.gz ",
              "> /workdir/mw489/TanzaniaData_June2017/vcfFIles/TanzaniaData_20170601_withRef_chr1.samples"))

system(paste0("bcftools query --list-samples ",
              "/workdir/mw489/LV_paula_Jul2016/raw/LV_naCRRINextGen_paula_withRef_chr1.vcf ",
              "> /workdir/mw489/LV_paula_Jul2016/raw/LV_naCRRINextGen_paula_withRef_chr1.samples"))

system(paste0("bcftools query --list-samples ",
              "/workdir/mw489/LV_paula_Jan2017/vcfFiles/paula_jan2017_4plates_withRef_chr1.vcf",
              "> /workdir/mw489/LV_paula_Jan2017/vcfFiles/paula_jan2017_4plates_withRef_chr1.samples"))
june2016samples<-read.table(file="/workdir/mw489/June2016_VCF/cassavaGBSbuild_June2016_withRef_chr1.samples",
                            stringsAsFactors = F, header = F)$V1
tzsamples<-read.table(file="/workdir/mw489/TanzaniaData_June2017/vcfFIles/TanzaniaData_20170601_withRef_chr1.samples",
                            stringsAsFactors = F, header = F)$V1
paulaJuly16<-read.table(file="/workdir/mw489/LV_paula_Jul2016/raw/LV_naCRRINextGen_paula_withRef_chr1.samples",
                            stringsAsFactors = F, header = F)$V1
paulaJan17<-read.table(file="/workdir/mw489/LV_paula_Jan2017/vcfFiles/paula_jan2017_4plates_withRef_chr1.samples",
                            stringsAsFactors = F, header = F)$V1
gbsSamples<-tibble(FullSampleName=c(tzsamples,june2016samples,paulaJan17,paulaJuly16)) %>% 
  separate(FullSampleName,c("SampleID","GBS_ID"),":",extra = 'merge',remove = F)

# UG11|UG12|UG13|UG14
dart2gbs<-tibble(dartSampleName=dcas4459samples$V1 %>% 
                   grep("TARI",.,value=T,invert = T) %>% 
                   grep("Full_sib_Nigeria",.,value = T,invert = T) %>% 
                   grep("UG11|UG12|UG13|UG14",.,value = T, ignore.case = T)) %>% 
  inner_join(gbsSamples %>% 
               mutate(dartSampleName=toupper(SampleID))) %>% 
  select(dartSampleName,FullSampleName) %>% 
  distinct %>% as.data.frame %>% 
  bind_rows(
    # UG15Fs (C1 CET, C0 UYT, C2 Parent)
    tibble(dartSampleName=dcas4459samples$V1 %>% 
             grep("TARI",.,value=T,invert = T) %>% 
             grep("Full_sib_Nigeria",.,value = T,invert = T) %>% 
             grep("CycleOne|CycleTwo|GS_Cycle|UYT|RTB|Namulonge_C1",.,value = T)) %>% 
      inner_join(
        bind_rows(readxl::read_xls("/workdir/mw489/GenotypingPlateMetaData/Plate18.xls"),
                  readxl::read_xls("/workdir/mw489/GenotypingPlateMetaData/Plate19.xls")) %>% 
          rename(dartSampleName=source_observation_unit_name,
                 SampleID=ncbi_taxonomy_id) %>% 
          select(dartSampleName,SampleID)
      ) %>% distinct %>% 
      inner_join(gbsSamples %>% 
                   mutate(SampleID=toupper(SampleID))) %>% 
      select(dartSampleName,FullSampleName) %>% distinct %>% as.data.frame 
  ) %>% 
  bind_rows(
    # More UG15F? plus NASE14 and ORERA
    tibble(dartSampleName=dcas4459samples$V1 %>% 
             grep("TARI",.,value=T,invert = T) %>% 
             grep("Full_sib_Nigeria",.,value = T,invert = T) %>% 
             grep("CycleOne|CycleTwo|GS_Cycle|UYT|RTB|Namulonge_C1",.,value = T,invert = T) %>% 
             grep("UG11|UG12|UG13|UG14",.,value = T, ignore.case = T,invert = T) %>% 
             grep("^UGC",.,value = T, ignore.case = T,invert = T)) %>% 
      inner_join(
        bind_rows(
          gbsSamples %>% 
            mutate(dartSampleName=SampleID),
          gbsSamples %>% 
            mutate(dartSampleName=toupper(SampleID)))) %>% 
      select(dartSampleName,FullSampleName) %>% as.data.frame %>% distinct
  ) %>% 
  bind_rows(
    # TARI
    tibble(dartSampleName=dcas4459samples$V1 %>% 
             grep("TARI",.,value=T)) %>% 
      separate(dartSampleName,c("PlateIDandPos","SampleID"),"\\.\\.\\.",remove = F) %>% 
      inner_join(
        bind_rows(
          gbsSamples,
          gbsSamples %>% 
            mutate(SampleID=toupper(SampleID)))) %>% 
      select(dartSampleName,FullSampleName) %>% as.data.frame %>% distinct
  ) %>% 
  bind_rows(
    # TARI TP UKGs and KBHs
    tibble(dartSampleName=dcas4459samples$V1 %>% 
             grep("TARI",.,value=T)) %>% 
      separate(dartSampleName,c("PlateIDandPos","SampleID"),"\\.\\.\\.",remove = F) %>% 
      anti_join(
        bind_rows(
          gbsSamples,
          gbsSamples %>% 
            mutate(SampleID=toupper(SampleID)))) %>% 
      mutate(SampleID=gsub("TZUKG","UKG",SampleID),
             SampleID=gsub("TZKBH","KBH20",SampleID)) %>% 
      inner_join(
        bind_rows(
          gbsSamples,
          gbsSamples %>% 
            mutate(SampleID=toupper(SampleID)))) %>% 
      select(dartSampleName,FullSampleName) %>% as.data.frame %>% distinct
  ) %>% 
  distinct
dim(dart2gbs)
saveRDS(dart2gbs,file="/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/dart2gbs_NameMatchesToVerifyByIBD_82819.rds")
write.table(unique(dart2gbs$dartSampleName),
            file=paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                        "dartSamples_toVerifyAgainstGBS_82819.txt"),
            row.names = F, col.names = F, quote = F)
write.table(unique(dart2gbs$FullSampleName),
            file=paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                        "gbsSamples_toVerifyAgainstDArT_82819.txt"),
            row.names = F, col.names = F, quote = F)

Site Lists

Get sitesWithAlleles lists

options(mc.cores=18)
plan(multiprocess)
june2016vcf_sites<-tibble(Chr=1:18) %>%
  mutate(ExtractSiteList=future_map(Chr,function(Chr){ 
    system(paste0("zcat /workdir/mw489/June2016_VCF/",
                  "cassavaGBSbuild_June2016_withRef_chr",Chr,".vcf.gz ",
                  "| cut -f1-5 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "cassavaGBSbuild_June2016_withRef_chr",Chr,".sitesWithAlleles"))
    sites<-read.table(file = paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                    "cassavaGBSbuild_June2016_withRef_chr",Chr,".sitesWithAlleles"),
                      stringsAsFactors = F, header = F) }))

options(mc.cores=18)
plan(multiprocess)
tzvcf_sites<-tibble(Chr=1:18) %>%
  mutate(ExtractSiteList=future_map(Chr,function(Chr){ 
    system(paste0("zcat /workdir/mw489/TanzaniaData_June2017/vcfFIles/",
                  "TanzaniaData_20170601_withRef_chr",Chr,".vcf.gz ",
                  "| cut -f1-5 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "TanzaniaData_20170601_withRef_chr",Chr,".sitesWithAlleles"))
    sites<-read.table(file = paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                    "TanzaniaData_20170601_withRef_chr",Chr,".sitesWithAlleles"),
                      stringsAsFactors = F, header = F) }))

options(mc.cores=18)
plan(multiprocess)
paulaJul2016vcf_sites<-tibble(Chr=1:18) %>%
  mutate(ExtractSiteList=future_map(Chr,function(Chr){ 
    system(paste0("cat /workdir/mw489/LV_paula_Jul2016/raw/",
                  "LV_naCRRINextGen_paula_withRef_chr",Chr,".vcf ",
                  "| cut -f1-5 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "LV_naCRRINextGen_paula_withRef_chr",Chr,".sitesWithAlleles"))
    sites<-read.table(file = paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                    "LV_naCRRINextGen_paula_withRef_chr",Chr,".sitesWithAlleles"),
                      stringsAsFactors = F, header = F) }))

options(mc.cores=18)
plan(multiprocess)
paulaJan2017vcf_sites<-tibble(Chr=1:18) %>%
  mutate(ExtractSiteList=future_map(Chr,function(Chr){ 
    system(paste0("cat /workdir/mw489/LV_paula_Jan2017/vcfFiles/",
                  "paula_jan2017_4plates_withRef_chr",Chr,".vcf ",
                  "| cut -f1-5 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "paula_jan2017_4plates_withRef_chr",Chr,".sitesWithAlleles"))
    sites<-read.table(file = paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                    "paula_jan2017_4plates_withRef_chr",Chr,".sitesWithAlleles"),
                      stringsAsFactors = F, header = F) }))

dart_sites<-read.table(paste0("/workdir/mw489/DCas19_4459/",
                              "DCas19_4459_82719.sitesWithAlleles"),
                       stringsAsFactors = F, header = T)
june2016vcf_sites %>% 
  unnest() %$% table(c(V4,V5)) 
tzvcf_sites %>% 
  unnest() %$% table(c(V4,V5))
paulaJul2016vcf_sites %>% 
  unnest() %$% table(c(V4,V5))
paulaJan2017vcf_sites %>% 
  unnest() %$% table(c(V4,V5))
dart_sites %>% 
  unnest() %$% table(c(REF,ALT))

Sites common to all GBS sources

snpsCommonToAllGBS<-june2016vcf_sites %>% 
  unnest() %>% 
  semi_join(tzvcf_sites %>% 
              unnest()) %>% 
  semi_join(paulaJul2016vcf_sites %>% 
              unnest()) %>% 
  semi_join(paulaJan2017vcf_sites %>% 
              unnest()) %>% 
  filter(!grepl(",",V4),
         !grepl(",",V5),
         V4!=".",
         V5!=".") %>% 
  select(-Chr) #%$% table(c(V4,V5))
dim(snpsCommonToAllGBS) # [1] 178128      5
head(snpsCommonToAllGBS)

saveRDS(snpsCommonToAllGBS,file=paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                       "snpsCommonToAllGBS_82819.rds"))

DArT-GBS intersection

dart_gbs_intersection<-snpsCommonToAllGBS %>% 
  rename(CHROM=V1,
         POS=V2,
         ID=V3,
         REF=V4,
         ALT=V5) %>% 
  semi_join(dart_sites)
dart_gbs_intersection %>% dim # 402
saveRDS(dart_gbs_intersection,file=paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                          "dart_gbs_intersection_82819.rds"))

Extract from raw VCFs

library(tidyverse); library(magrittr)
gbs_sites<-readRDS(paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                       "snpsCommonToAllGBS_82819.rds"))
dart_gbs_isect_sites<-readRDS(paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                                          "dart_gbs_intersection_82819.rds"))
dart_sites<-read.table(paste0("/workdir/mw489/DCas19_4459/",
                              "DCas19_4459_82719.sitesWithAlleles"),
                       stringsAsFactors = F, header = T)
library(tidyverse); library(magrittr); require(furrr)
options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(write_isect_sites=future_map(Chr,function(Chr){
    isect_thischr<-dart_gbs_isect_sites %>% 
      filter(CHROM==Chr) %>% 
      select(CHROM,POS)
    write.table(isect_thischr,
                file=paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                            Chr,"_gbs_dart_isect_sites_82819.sites"),
                row.names = F, col.names = F, quote = F) }))

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(ExtractRaw_gbsSamples=future_map(Chr,function(Chr){
    system(paste0("vcftools --gzvcf /workdir/mw489/June2016_VCF/cassavaGBSbuild_June2016_withRef_chr",Chr,".vcf.gz ",
                  "--keep /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "gbsSamples_toVerifyAgainstDArT_82819.txt ",
                  "--positions /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbs_dart_isect_sites_82819.sites ",
                  "--recode ",
                  "--stdout | bgzip -c -@ 24 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_june2016vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz")) }))
# 180 samples

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(ExtractRaw_gbsSamples=future_map(Chr,function(Chr){
    system(paste0("vcftools --gzvcf /workdir/mw489/TanzaniaData_June2017/vcfFIles/",
                  "TanzaniaData_20170601_withRef_chr",Chr,".vcf.gz ",
                  "--keep /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "gbsSamples_toVerifyAgainstDArT_82819.txt ",
                  "--positions /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbs_dart_isect_sites_82819.sites ",
                  "--recode ",
                  "--stdout | bgzip -c -@ 24 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_tzvcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz")) }))
# 480 samples

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(ExtractRaw_gbsSamples=future_map(Chr,function(Chr){
    system(paste0("vcftools --vcf /workdir/mw489/LV_paula_Jul2016/raw/",
                  "LV_naCRRINextGen_paula_withRef_chr",Chr,".vcf ",
                  "--keep /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "gbsSamples_toVerifyAgainstDArT_82819.txt ",
                  "--positions /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbs_dart_isect_sites_82819.sites ",
                  "--recode ",
                  "--stdout | bgzip -c -@ 24 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_paulaJul2016vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz")) }))
## NOTE: NO SAMPLES EXTRACTED!!!

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(ExtractRaw_gbsSamples=future_map(Chr,function(Chr){
    system(paste0("vcftools --vcf /workdir/mw489/LV_paula_Jan2017/vcfFiles/",
                  "paula_jan2017_4plates_withRef_chr",Chr,".vcf ",
                    "--keep /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "gbsSamples_toVerifyAgainstDArT_82819.txt ",
                  "--positions /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbs_dart_isect_sites_82819.sites ",
                  "--recode ",
                  "--stdout | bgzip -c -@ 24 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_paulaJan2017vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz")) }))
## 19 samples extracted

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(ExtractRaw_dartSamples=future_map(Chr,function(Chr){
    system(paste0("vcftools --gzvcf /workdir/mw489/DCas19_4459/",
                  "DCas19_4459_82719.vcf.gz ",
                  "--keep /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                  "dartSamples_toVerifyAgainstGBS_82819.txt ",
                  "--positions /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbs_dart_isect_sites_82819.sites ",
                  "--recode ",
                  "--stdout | bgzip -c -@ 24 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_dartSamples_toVerifyAgainstGBS_gbsDartIntersectingSites_82819.vcf.gz")) }))
# 629 samples

Index

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(Index=future_map(Chr,function(Chr){ 
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_june2016vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz")) 
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_tzvcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz"))
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_paulaJul2016vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz"))
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_paulaJan2017vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz"))
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_dartSamples_toVerifyAgainstGBS_gbsDartIntersectingSites_82819.vcf.gz")) }))

Merge GBS

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(Merge=future_map(Chr,function(Chr){ 
    system(paste0("bcftools merge ",
                  "--output /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllgbsSamplesToVerify_gbsDartIntersectingSites_82819.vcf.gz ",
                  "--merge snps --output-type z --threads 6 ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_june2016vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_tzvcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_gbsSamples_paulaJan2017vcf_toVerifyAgainstDArT_gbsDartIntersectingSites_82819.vcf.gz")) }))

Merge GBS-DArT

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(Merge=future_map(Chr,function(Chr){ 
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllgbsSamplesToVerify_gbsDartIntersectingSites_82819.vcf.gz")) 
    
    system(paste0("bcftools merge ",
                  "--output /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllSamplesToVerify_gbsDartIntersectingSites_82819.vcf.gz ",
                  "--merge snps --output-type z --threads 6 ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllgbsSamplesToVerify_gbsDartIntersectingSites_82819.vcf.gz ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_dartSamples_toVerifyAgainstGBS_gbsDartIntersectingSites_82819.vcf.gz")) }))

Pre-analysis filter

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(PreAnalysisFilter=future_map(Chr,function(Chr){ 
    system(paste0("vcftools --gzvcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllSamplesToVerify_gbsDartIntersectingSites_82819.vcf.gz ",
                  "--min-alleles 2 --max-alleles 2 --minDP 4 --maxDP 50 ", 
                  "--recode --stdout | bgzip -c -@ 24 > ",
                  "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllSamplesToVerify_gbsDartIntersectingSites_filtered_82819.vcf.gz"))}))

Concat chroms

options(mc.cores=18)
plan(multiprocess)
tibble(Chr=1:18) %>%
  mutate(Index=future_map(Chr,function(Chr){ 
    system(paste0("tabix -f -p vcf /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",
                  Chr,"_AllSamplesToVerify_gbsDartIntersectingSites_filtered_82819.vcf.gz"))
  }))

system(paste0("bcftools concat --allow-overlaps ",
              "--output /workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
              "AllChrom_AllSamplesToVerify_gbsDartIntersectingSites_filtered_82819.vcf.gz ",
              "--output-type z --threads 6 ",
              paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/chr",1:18,
                     "_AllSamplesToVerify_gbsDartIntersectingSites_filtered_82819.vcf.gz",collapse = " ")))
system(paste0("vcftools --gzvcf ",
              "/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
              "AllChrom_AllSamplesToVerify_gbsDartIntersectingSites_filtered_82819.vcf.gz"))

After filtering, kept 1308 out of 1308 Individuals After filtering, kept 402 out of a possible 402 Sites

Choose DArT-GBS matching records

library(tidyverse); library(magrittr); library(data.table)
genome<-fread(paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                     "AllChrom_AllSamplesToVerify_gbsDartIntersectingSites_filtered_82819.genome"),
              stringsAsFactors = F, header = T) %>%
  as_tibble
  
dart2gbs<-readRDS(file="/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/dart2gbs_NameMatchesToVerifyByIBD_82819.rds")

Make “official” matches

IBDmatches<-dart2gbs %>% 
  left_join(
    genome %>% 
      filter(DST>=0.9 | PI_HAT>=0.65) %>% 
      select(IID1,IID2,DST,PI_HAT) %>% 
      rename(FullSampleName=IID1,
             dartSampleName=IID2)
    ) %>% 
  filter(!is.na(DST)) %>% # 564 pass
  arrange(FullSampleName,desc(PI_HAT)) %>% 
  group_by(dartSampleName) %>% 
  slice(1) %>% 
  group_by(FullSampleName) %>% 
  slice(1) %>% 
  ungroup() # 455 unique dart-gbs matches!
IBDmatches %>% count(FullSampleName) %>% arrange(desc(n))
IBDmatches %>% count(dartSampleName) %>% arrange(desc(n))

455 unique pairs of FullSampleName (GBS) and dartName (DArTseqLD)

saveRDS(IBDmatches,file="/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/gbs2dart_SamplesVerifiedByIBD_82819.rds")

Check if any were in RefPanel3

refpanel3_samples<-read.table(paste0("/workdir/mw489/ImputationStageIII_72619/",
                  "chr2_RefPanelAndGSprogeny_ReadyForGP_72719.fam"),
           stringsAsFactors = F, header = F)$V2

table(IBDmatches$FullSampleName %in% refpanel3_samples)

FALSE TRUE 398 57

IBDmatches$FullSampleName[IBDmatches$FullSampleName %in% refpanel3_samples]

Of those, were any imputed as GBS+DArT?

gbsPlusDart_refpanel3_samples<-read.table(paste0("/workdir/mw489/ImputationStageI_71119/",
                                                 "samplesWithVerifiedGBSandDart_71119.txt"),
                                          stringsAsFactors = F, header = F)$V1
table(IBDmatches$FullSampleName %in% gbsPlusDart_refpanel3_samples)

FALSE TRUE 413 42

Lists for imputation

Make a list for later use: samples imputed in RefPanel3 as GBS only, which now have matches Exclude those from RefPanel3 when imputed target (since now include in target)

refpanel3samples_prevImputedAsGBSonly_nowWithVerifiedDart<-IBDmatches$FullSampleName %>% 
  .[. %in% refpanel3_samples] %>% 
  .[!. %in% gbsPlusDart_refpanel3_samples] # 15 of them
write.table(refpanel3samples_prevImputedAsGBSonly_nowWithVerifiedDart,
            file=paste0("/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/",
                        "refpanel3samples_prevImputedAsGBSonly_nowWithVerifiedDart_82819.txt"),
            row.names = F, col.names = F, quote = F)

Finally, make a list of the 413 GBS-DArT matches that weren’t imputed as GBS+DArT samples previously in RefPanelI (i.e. exclude the 42 referenced above)…

IBDmatches %<>% 
  filter(!FullSampleName %in% gbsPlusDart_refpanel3_samples)
saveRDS(IBDmatches,file="/workdir/mw489/DCas19_4459/VerifyMatchesToGBS_82819/gbs2dart_SamplesVerifiedByIBD_toImpute_82819.rds")

sessionInfo()