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/ImputeDCas20_5419.Rmd) and HTML (docs/ImputeDCas20_5419.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 bcbcec3 wolfemd 2020-10-09 Publish imputations for 2020 of DCAs20_5419 (and 2019 code too) for
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

DArTseqLD (DCas20-5419). Contains pre-breeding materials of combined African and L. American descent.

  1. 2019 East Africa Reference panel: 56250 SNP, 19136 clones included W. Africa landraces
  2. Latin America Ref (4101 cclones, 65886 SNP)

Suggest comparing the results using PCA, prediction, correlation of kinship matrices, etc.

Copy data

Copy the imputation reference panel from 2019 to the data/ folder.

cp -r /home/jj332_cas/marnin/NaCRRI_2020GS /workdir/mw489/
cp /home/jj332_cas/CassavaGenotypeData/nextgenImputation2019/ImputationEMBRAPA_102419/chr*_ImputationReferencePanel_EMBRAPA_Phased_102619.vcf.gz /workdir/mw489/NaCRRI_2020GS/data/
cp -r /home/jj332_cas/marnin/NaCRRI_2020GS/code /workdir/mw489/NaCRRI_2020GS/
cp -r /home/jj332_cas/CassavaGenotypeData/CassavaGeneticMap /workdir/mw489/NaCRRI_2020GS/data/
cp /home/jj332_cas/CassavaGenotypeData/nextgenImputation2019/ImputationEMBRAPA_102419/chr*_ImputationReferencePanel_EMBRAPA_Ready2Phase_102419.vcf.gz /workdir/mw489/NaCRRI_2020GS/data/ 
cp /home/jj332_cas/CassavaGenotypeData/nextgenImputation2019/ImputationEastAfrica_StageII_90919/chr*_ImputationReferencePanel_StageVI_91119.vcf.gz /workdir/mw489/NaCRRI_2020GS/data/

With RefPanelEA

Impute with Beagle V5.0.

Use the “imputation reference panel” dataset from 2019, e.g. chr1_ImputationReferencePanel_StageVI_91119.vcf.gz as reference.

Used 1 large memory Cornell CBSU machine (e.g. cbsulm16; 112 cores, 512 GB RAM), running 1 chromosome at a time.

R functions are stored in the code/ sub-directory. Functions sourced from e.g. imputationFunctions.R are wrappers around e.g. Beagle, and other command line programs.

targetVCFpath<-here::here("data/Report-DCas20-5419/") # location of the targetVCF
refVCFpath<-here::here("data/")
mapPath<-here::here("data/CassavaGeneticMap/")
outPath<-here::here("output/")
outSuffix<-"DCas20_5419"

Impute

source(here::here("code","imputationFunctions.R"))

purrr::map(1:18,~runBeagle5(targetVCF=paste0(targetVCFpath,"chr",.,"_DCas20_5419.vcf.gz"),
                            refVCF=paste0(refVCFpath,"chr",.,"_ImputationReferencePanel_StageVI_91119.vcf.gz"),
                            mapFile=paste0(mapPath,"chr",.,"_cassava_cM_pred.v6_91019.map"),
                            outName=paste0(outPath,"chr",.,"_DCas20_5419_EA_REFimputed"),
                            nthreads=112))

Clean up Beagle log files after run. Move to sub-directory output/BeagleLogs/.

cd /workdir/mw489/NaCRRI_2020GS/output/; 
mkdir BeagleLogs;
cp *_DCas20_5419_EA_REFimputed.log BeagleLogs/
cp -r BeagleLogs /home/jj332_cas/marnin/NaCRRI_2020GS/output/
cp *_DCas20_5419_EA_REFimputed* /home/jj332_cas/marnin/NaCRRI_2020GS/output/

Post-impute filter

For now, the function will just do a fixed filter: AR2>0.75 (DR2>0.75 as of Beagle5.0), P_HWE>1e-20, MAF>0.005 [0.5%].

It can easily be modified in the future to include parameters to vary the filter specifications.

Input parameters

#' @inPath path to input VCF-to-be-filtered, can be left null if path included in @inName . Must end in "/"
#' @inName name of input VCF file EXCLUDING file extension. Assumes .vcf.gz
#' @outPath path where filtered VCF and related are to be stored.Can be left null if path included in @outName . Must end in "/".
#' @outName name desired for output EXCLUDING extension. Output will be .vcf.gz 

Loop to filter all 18 VCF files in parallel

inPath<-here::here("output/")
outPath<-here::here("output/")
source(here::here("code","imputationFunctions.R"))
require(furrr); options(mc.cores=ncores); plan(multiprocess)
future_map(1:18,~postImputeFilter(inPath=inPath,
                                  inName=paste0("chr",.,"_DCas20_5419_EA_REFimputed"),
                                  outPath=outPath,
                                  outName=paste0("chr",.,"_DCas20_5419_EA_REFimputedAndFiltered")))

Check what’s left

purrr::map(1:18,~system(paste0("zcat ",here::here("output/"),"chr",.,"_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz | wc -l")))
# 5913
# 2353
# 2428
# 2437
# 2553
# 2258
# 983
# 2161
# 2294
# 1660
# 1752
# 2194
# 1566
# 3362
# 2563
# 1948
# 1746
# 1749
cd /workdir/mw489/NaCRRI_2020GS/output/;
cp -r *_DCas20_5419_EA_REFimputed* /home/jj332_cas/marnin/NaCRRI_2020GS/output/

With RefPanelLA

Impute

targetVCFpath<-here::here("data/Report-DCas20-5419/") # location of the targetVCF
refVCFpath<-here::here("data/")
mapPath<-here::here("data/CassavaGeneticMap/")
outPath<-here::here("output/")
outSuffix<-"DCas20_5419"
source(here::here("code","imputationFunctions.R"))

purrr::map(1:18,~runBeagle5(targetVCF=paste0(targetVCFpath,"chr",.,"_DCas20_5419.vcf.gz"),
                            refVCF=paste0(refVCFpath,"chr",.,"_ImputationReferencePanel_EMBRAPA_Phased_102619.vcf.gz"),
                            mapFile=paste0(mapPath,"chr",.,"_cassava_cM_pred.v6_91019.map"),
                            outName=paste0(outPath,"chr",.,"_DCas20_5419_LA_REFimputed"),
                            nthreads=112))

Clean up Beagle log files after run. Move to sub-directory output/BeagleLogs/.

cd /workdir/mw489/NaCRRI_2020GS/output/; 
#mkdir BeagleLogs;
cp *_DCas20_5419_LA_REFimputed.log BeagleLogs/
cp -r BeagleLogs /home/jj332_cas/marnin/NaCRRI_2020GS/output/
cp *_DCas20_5419_LA_REFimputed* /home/jj332_cas/marnin/NaCRRI_2020GS/output/

Post-impute filter

For now, the function will just do a fixed filter: AR2>0.75 (DR2>0.75 as of Beagle5.0), P_HWE>1e-20, MAF>0.005 [0.5%]. It can easily be modified in the future to include parameters to vary the filter specifications.

Input parameters

#' @inPath path to input VCF-to-be-filtered, can be left null if path included in @inName . Must end in "/"
#' @inName name of input VCF file EXCLUDING file extension. Assumes .vcf.gz
#' @outPath path where filtered VCF and related are to be stored.Can be left null if path included in @outName . Must end in "/".
#' @outName name desired for output EXCLUDING extension. Output will be .vcf.gz 

Loop to filter all 18 VCF files in parallel

inPath<-here::here("output/")
outPath<-here::here("output/")
source(here::here("code","imputationFunctions.R"))
require(furrr); options(mc.cores=ncores); plan(multiprocess)
future_map(1:18,~postImputeFilter(inPath=inPath,
                                  inName=paste0("chr",.,"_DCas20_5419_LA_REFimputed"),
                                  outPath=outPath,
                                  outName=paste0("chr",.,"_DCas20_5419_LA_REFimputedAndFiltered")))

Check what’s left

purrr::map(1:18,~system(paste0("zcat ",here::here("output/"),"chr",.,"_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz | wc -l")))
# 645
# 358
# 440
# 124
# 517
# 354
# 223
# 337
# 288
# 198
# 231
# 368
# 325
# 492
# 485
# 257
# 344
# 501

Note that not nearly as many SNPs are passing filter after imputation of the germplasm with the L. America RefPanel, compared to the E. Africa Panel

cd /workdir/mw489/NaCRRI_2020GS/output/;
cp *_DCas20_5419_LA_REFimputedAndFiltered* /home/jj332_cas/marnin/NaCRRI_2020GS/output/

Formats for downstream analysis

EA

# Make binary plink
pathIn<-"/home/jj332_cas/marnin/NaCRRI_2020GS/output/"
#pathIn<-"/workdir/mw489/NaCRRI_2020GS/output/"
require(furrr); options(mc.cores=ncores); plan(multiprocess)
future_map(1:18,~system(paste0("export PATH=/programs/plink-1.9-x86_64-beta3.30:$PATH;",
                               "plink --vcf ",pathIn,"chr",.,
                               "_DCas20_5419_EA_REFimputedAndFiltered.vcf.gz ",
                               "--make-bed --const-fid ",
                               "--out ",pathIn,"chr",.,
                               "_DCas20_5419_EA_REFimputedAndFiltered")))
# Recode to dosage
future_map(1:18,~system(paste0("export PATH=/programs/plink-1.9-x86_64-beta3.30:$PATH;",
                               "plink --bfile ",pathIn,"chr",.,
                               "_DCas20_5419_EA_REFimputedAndFiltered ",
                               "--recode A ",
                               "--out ",pathIn,"chr",.,
                               "_DCas20_5419_EA_REFimputedAndFiltered")))

# Genome-wide dosage (for use in R)
snps<-future_map(1:18,~read.table(paste0(pathIn,"chr",.,"_DCas20_5419_EA_REFimputedAndFiltered.raw"), stringsAsFactor=F, header = T) %>% 
                   dplyr::select(-FID,-PAT,-MAT,-SEX,-PHENOTYPE) %>% 
                   column_to_rownames(var = "IID") %>% 
                   as.matrix()) %>% 
  reduce(.,cbind)
# dim(snps)
# [1]  2043 41740
saveRDS(snps,file = paste0(pathIn,"DosageMatrix_DCas20_5419_EA_REFimputedAndFiltered.rds"))

LA

# Make binary plink
pathIn<-"/home/jj332_cas/marnin/NaCRRI_2020GS/output/"
require(furrr); options(mc.cores=ncores); plan(multiprocess)
future_map(1:18,~system(paste0("export PATH=/programs/plink-1.9-x86_64-beta3.30:$PATH;",
                               "plink --vcf ",pathIn,"chr",.,
                               "_DCas20_5419_LA_REFimputedAndFiltered.vcf.gz ",
                               "--make-bed --const-fid ",
                               "--out ",pathIn,"chr",.,
                               "_DCas20_5419_LA_REFimputedAndFiltered")))
# Recode to dosage
future_map(1:18,~system(paste0("export PATH=/programs/plink-1.9-x86_64-beta3.30:$PATH;",
                               "plink --bfile ",pathIn,"chr",.,
                               "_DCas20_5419_LA_REFimputedAndFiltered ",
                               "--recode A ",
                               "--out ",pathIn,"chr",.,
                               "_DCas20_5419_LA_REFimputedAndFiltered")))

# Genome-wide dosage (for use in R)
snps<-future_map(1:18,~read.table(paste0(pathIn,"chr",.,"_DCas20_5419_LA_REFimputedAndFiltered.raw"), stringsAsFactor=F, header = T) %>% 
                   dplyr::select(-FID,-PAT,-MAT,-SEX,-PHENOTYPE) %>% 
                   column_to_rownames(var = "IID") %>% 
                   as.matrix()) %>% 
  reduce(.,cbind)
dim(snps)
# [1] 2043 6307
saveRDS(snps,file = paste0(pathIn,"DosageMatrix_DCas20_5419_LA_REFimputedAndFiltered.rds"))

sessionInfo()