- Download mouse SNPs by strain provided by Sanger
- Break up the SNP VCF by chromosome
- For each site in each chromosome, the alternate allele frequency is calculated from the DP4 format tag as (DP4[3]+DP4[4])/sum(DP4[1..4])
- Merge the chromosome data to tab-separated values
When running shiny apps in RStudio using runGitHub()
, I often found that the app would crash if required libraries couldn't be loaded. For complex apps, this was frustrating because it was difficult to know which libraries were required unless there's good documentation and/or code layout.
But this is a common problem when sharing code in general. So this little script was my own attempt at a solution.
Note: The pacman
package has a similar motivation. But as far as I can tell, it requires loading libraries with the p_load
function. So you could probably just recursively replace library
or require
calls with p_load
as an alternative to this solution.