Python version of example perl script for parsing genotype data