Implemented calculatePvalues() that runs most of the other functions. Some arguments changed to make things more efficient in calculatePvalues().
Changed how the data was being processed in calculateStats() to pass only the actual subset of interest to fstats.apply(). This reduces memory usage, specially when considering that chr1 is nearly 1GB in memory. Added literature references and double checked man pages via quick visual inspection.