first commit of block.py, to average counts over loci