This code will calculate Shannon's genetic distance for SNP's in a fastSTRUCTURE format in R.