@Frances: You should make several changes to this:
Make the value of the pseudocount an optional argument in the function signature, and set a reasonable default. Such as pseudocount=0.5. Then expand the documentation to explain what the pseudocount argument means.
Do not use the pseudocount for the Fisher's exact test. That test should be performed on the raw values as the Fisher's test already works fine with zero counts. The pseudocounts should only be used for computing the odds ratios. Implementation-wise, this probably means doing the Fisher test and then adding the pseudocount. Clearly explain this in the docs.
You'll have to fix so it passes the doctest (right now it fails, see here). Note that if you do point (2) above, you should be changing the odds ratios in the doctest output but not the P-values, since the P-value counts won't change.
@Frances: You should make several changes to this:
Make the value of the pseudocount an optional argument in the function signature, and set a reasonable default. Such as
pseudocount=0.5
. Then expand the documentation to explain what the pseudocount argument means.Do not use the pseudocount for the Fisher's exact test. That test should be performed on the raw values as the Fisher's test already works fine with zero counts. The pseudocounts should only be used for computing the odds ratios. Implementation-wise, this probably means doing the Fisher test and then adding the pseudocount. Clearly explain this in the docs.
You'll have to fix so it passes the doctest (right now it fails, see here). Note that if you do point (2) above, you should be changing the odds ratios in the doctest output but not the P-values, since the P-value counts won't change.