# The Iterative Exclusion of Compatible Samples Workflow for Multi-SNP Analysis in Complex Diseases
## 2 Materials and Methods
### Iterative Exclusion of Compatible Samples Workflow
On the other hand, in the second mode, the program will run iteratively until the next round of QCA calculation has no solution or no pathogenic pattern can be extracted. It is recommended to initially limit the number of iterations to a smaller value and then decide whether to increase the number of iterations or switch to the second mode after observing the results. This approach helps avoid excessive analysis time in the beginning. The framework of IECS with data examples is presented in Figure 2. In the first mode, IECS performs the first round of analysis: QCA obtains n prime implicants, among which PI-1 has the greatest coverage (0.557). Therefore, the pathogenic pattern of simultaneous mutations of SNP B and SNP D is extracted from PI-1. The \(p\)-value (0.023) for this pathogenic pattern is calculated in the source dataset. Next, samples that are compatible with the pathogenic pattern (such as sample 2, etc.) are excluded. Then, it is checked whether the number of iterations has been reached. If so, the IECS workflow is ended, and all the items are output. If not, IECS continues with a following round of iterations with the remaining samples. During the iterations, if the solution of QCA is empty or the extracted pathogenic pattern is empty, the items obtained in previous rounds of iteration are output, and the IECS workflow is ended. In the second mode, IECS works until a certain round of QCA solution is empty or the extracted pathogenic pattern is empty. The pseudocode of IECS is as following Algorithm 1. The code folder is available at [[https://github.com/happyputi/IECS](https://github.com/happyputi/IECS)]([https://github.com/happyputi/IECS](https://github.com/happyputi/IECS)) (accessed on 10 October 2023). ``` Input: k: threshold of iterations; consistency threshold: threshold of consistency; U: set of samples. Output: Solution: The SNP combinations with \(p\)-value of chi-square test. 1: Solution \(\leftarrow\emptyset\)
2: V \(\leftarrow\) U
3: W \(\leftarrow\) U
4: For i = 1 \(\rightarrow\) k do
5: X \(\leftarrow\) qca(V)
6: If XLength == 1 then
7: Break
8: Else
9: Z \(\leftarrow\) Extractpattern(X)
10: p \(\leftarrow\) Chisquaretest(Z, W)
11: V \(\leftarrow\) Excludesamples(V)
12: Z \(\leftarrow\) Append(Z, p)
13: Solution \(\leftarrow\) Append(Solution, Z)
14: End if
15: End for

### Analysis of Necessary Conditions

Analysis of necessary conditions considers complex diseases as the subsets of single SNPs and calculates the consistency and coverage parameters. Then, single SNPs with consistency and coverage greater than the threshold are selected, followed by a chi-square test to screen single SNPs as the necessary conditions (with statistical significance) of complex diseases. ### Performance Measurements

The recognition ability (power) and runtimes of MDR, BOOST, and IECS were compared. Measurement of power was performed with the proportion of the number of

Figure 2: Framework of IECS with data examples. For the data examples, the row name is the sample ID; each column indicates one SNP, except the last column, which indicates whether there is a disease. For conditions, red squares indicate the mutation of the SNP, and green squares indicate no mutation of the SNP. For the result, red squares indicate the disease, green squares indicate no disease. In the first mode, IECS performs the first round of analysis, and QCA obtains n prime implicants, among which PI-1 has the greatest coverage (0.557). Therefore, the pathogenic pattern of simultaneous mutations of SNP B and SNP D is extracted from PI-1. The \(p\)-value (0.023) for this pathogenic pattern is calculated in the source dataset. Next, samples that are compatible with the pathogenic pattern (such as sample 2, etc.) are excluded. This cycle of processes is repeated until the preset maximum number of iterations is obtained, the results are output, and the IECS workflow is ended.