Move this logic up so that the `else` block becomes:

```python
elif allele1 != allele2:
    altValue = '{0},{1}'.format(allele1, allele2)
else:
    altValue = allele1
```