Thanks to everyone who helped me out in the past with this problem, but I seem to have found another error - not in the script kindly provided but in hindsight I should've thought this through...
Thanks Don, I have a single data file which simply lists all base pairs for all chromosomes for the samples one under the other, so the file is quite large (there are over 3000 samples). Ideally I...