# The Iterative Exclusion of Compatible Samples Workflow for Multi-SNP Analysis in Complex Diseases
## 2 Materials and Methods  
### Iterative Exclusion of Compatible Samples Workflow  
In set theory, the definition of a subset is as follows: consider two sets X and Y, if every element in X is also an element in Y, then X is a subset of Y. A subset is a sufficient condition for a superset, and it can be logically deduced that if X, then Y. In real situations, there are very rare complete subset relationships. Therefore, it is necessary to evaluate the extent to which a condition set is sufficient for an outcome set, namely, consistency. Consistency represents the proportion of samples with a particular antecedent or a combination of antecedents with the same outcome. Coverage represents the extent to which the subset covers the target set, which can be used to measure the empirical importance of a particular antecedent or a combination of antecedents and represents the explanatory power of the dataset with respect to the result. QCA explores how the outcome occurs as a whole by examining the subset relationship of sufficiency between the conditional variables and the outcome variable. In sufficiency analysis, the conditional variable is taken as the subset of the outcome variable, whose consistency is calculated by Equation (1). \[\text{Consistency}(X_{i}\leq Y_{i})=\sum[\min(X_{i},Y_{i})]/\sum(X_{i}) \tag{1}\]  
The coverage is calculated by Equation (2). \[\text{Coverage}(X_{i}\leq Y_{i})=\sum[\min(X_{i},Y_{i})]/\sum(Y_{i}) \tag{2}\]  
where \(X_{i}\) denotes the value of the conditional variable and \(Y_{i}\) denotes the value of the outcome variable. The flow chart of IECS is presented in Figure 1. In IECS, the iteration of four steps (QCA, pattern extraction, the chi-square test, and exclusion of compatible samples) is used to analyze the sufficiency relationship between SNPs and complex diseases. QCA obtains the solution by constructing a truth table according to the dataset and performing Boolean minimization, simplification, and elimination of some conditional variables, and the resultant solution is a combination of multiple prime implicants. If there is no solution, the items obtained in previous rounds of iteration are output, and the IECS workflow is ended. Pattern extraction selects the prime implicant with the greatest raw coverage in the solution, extracts the conditional variables with \"1\", and combines these conditional variables into a pattern. If all the conditional variables in the prime implicant are \"0\", the prime implicant with the second greatest raw coverage is selected, and so on. If no pattern can be extracted from all prime implicants in the solution, the items obtained in previous rounds of iteration are output, and the IECS workflow is ended. Figure 1: Flow chart of IECS workflow. IECS utilizes the iteration of four steps (QCA, pattern extraction, the chi-square test, and exclusion of compatible samples) to analyze the relationship between SNPs and complex diseases. The chi-square test is then employed to test whether the pattern is related to the complex disease in the source dataset. Exclusion of compatible samples is performed to exclude all samples compatible with the pattern and subject the remaining samples to the next round of analysis. 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. IECS can work in two modes: the first mode restricts the number of iterations, while the second mode has no limitations on the number of iterations. In the first mode, assume that the number of iterations is set to k. If each round of QCA produces a solution and a pathogenic pattern can be extracted, the program will iteratively run until the preset number of iterations is reached. However, if QCA has no solution or no pathogenic pattern can be extracted in a certain round, the program will end and n pathogenic patterns will be obtained (n < k).