| Algorithm 1 Identify Epistatic Interactions Using k2 Metric | |
| Require: Maximum order mo; SNP combination x with mo SNPs generated by GPBSO; k2x as the k2 score of x | |
| Ensure: Epistatic interaction of order within [2, mo) or no result | |
| 1: | Set l = mo |
| 2: | while l > 1 do |
| 3: | foundImprovement = false |
| 4: | for each SNP index i in [0, l) do |
| 5: | Create a new SNP combination xx of length l - 1 by excluding x[i] |
| 6: | Compute k2xx as the k2 score for xx |
| 7: | if k2xx < k2x then |
| 8: | Update x to xx |
| 9: | Update k2x to k2xx |
| 10: | Decrement l by 1 |
| 11: | Set foundImprovement = true |
| 12: | Exit the loop |
| 13: | end if |
| 14: | end for |
| 15: | if not foundImprovement then |
| 16: | Exit the loop |
| 17: | end if |
| 18: | end while |
| 19: | if l > 1 then |
| 20: | return x as the detected epistatic interaction |
| 21: | end if |