updated genotypeToIndex function to pass in parameter for ploidy (defualt is 2)