Skip to content

Conversation

@nmendozam
Copy link
Contributor

If only one allele was genotyped for a gene, there is a zero division when calculating l95 and u95. This pull request solves that issue.

How to replicate the error:

First remove all alleles but one from a random gene in a data set, then run the following command.

python PyHLA/PyHLA.py --input input.pyhla --assoc --print

Error message

Traceback (most recent call last):
  File "PyHLA/PyHLA.py", line 2995, in <module>
    assoc = assocADRChiFisher(INFILE, DIGIT, FREQ, TEST,MODEL,ADJUST,EXCLUDE, PERM, SEED)
  File "PyHLA/PyHLA.py", line 1122, in assocADRChiFisher
    se = math.sqrt(1.0/n1  + 1.0/n2 +  1.0/n3 + 1.0/n4)
ZeroDivisionError: float division by zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant