Modified algorithm for qualitative test selection :
If there is a warning in chisq.test, try fisher.test with workspace=1e+08.
If it still fails, retry fisher.test with simulated p value with 1e+06 samples.