DNA Methylation of Window of Implantation Genes in Cervical Secretions Predicts Ongoing Pregnancy in Infertility Treatment

Window of implantation (WOI) genes have been comprehensively identified at the single cell level. DNA methylation changes in cervical secretions are associated with in vitro fertilization embryo transfer (IVF-ET) outcomes. Using a machine learning (ML) approach, we aimed to determine which methylation changes in WOI genes from cervical secretions best predict ongoing pregnancy during embryo transfer. A total of 2708 promoter probes were extracted from mid-secretory phase cervical secretion methylomic profiles for 158 WOI genes, and 152 differentially methylated probes (DMPs) were selected. Fifteen DMPs in 14 genes (BMP2, CTSA, DEFB1, GRN, MTF1, SERPINE1, SERPINE2, SFRP1, STAT3, TAGLN2, TCF4, THBS1, ZBTB20, ZNF292) were identified as the most relevant to ongoing pregnancy status. These 15 DMPs yielded accuracy rates of 83.53%, 85.26%, 85.78%, and 76.44%, and areas under the receiver operating characteristic curves (AUCs) of 0.90, 0.91, 0.89, and 0.86 for prediction by random forest (RF), naïve Bayes (NB), support vector machine (SVM), and k-nearest neighbors (KNN), respectively. SERPINE1, SERPINE2, and TAGLN2 maintained their methylation difference trends in an independent set of cervical secretion samples, resulting in accuracy rates of 71.46%, 80.06%, 80.72%, and 80.68%, and AUCs of 0.79, 0.84, 0.83, and 0.82 for prediction by RF, NB, SVM, and KNN, respectively. Our findings demonstrate that methylation changes in WOI genes detected noninvasively from cervical secretions are potential markers for predicting IVF-ET outcomes. Further studies of cervical secretion of DNA methylation markers may provide a novel approach for precision embryo transfer.


Introduction
Infertility affects about 20% of couples worldwide, a rate that is currently increasing [1]. Consequently, the use of assisted reproductive technologies (ARTs) is also increasing substantially, by up to 5-10% annually [2]. The number of ART cycles conducted annually has reached 3.3 million [3]. Although in vitro fertilization (IVF) is the most effective ART approach, its resultant pregnancy rates remain unsatisfactory.

Methylomic Profiles of Mid-Secretory Phase Cervical Secretions
No statistically significant differences in important demographic and clinical characteristics were found between the pregnancy and nonpregnancy groups in either the discovery or verification set (Table 1). Next, we tested the methylation status of the selected WOI genes from the midsecretory phase cervical secretion samples (n = 31 pregnancy, n = 37 nonpregnancy) in the array sample set. After quality control and normalization, 743,730 probes remained. Methylomic profiles were then used to extract WOI gene promoter probes for further analysis (Figure 1). The distribution of methylation values for each probe are demonstrated in a density plot (Supplementary Figure S1). analysis ( Figure 1). The distribution of methylation values for each probe are demonstrated in a density plot (Supplementary Figure S1). Figure 1. Study logistics. A total of 158 WOI genes were selected from the single cell endometrial transcriptomic profiles. In total, 2708 promoter probes of the 158 WOI genes were extracted from methylomic profiles generated by an EPIC 850K BeadChip array, from 31 pregnancy and 37 nonpregnancy mid-secretory phase cervical secretion samples. Probes were ranked by p-value to select 152 DMPs. These DMPs were used in the following refinement step using the Boruta algorithm to identify the 15 DMPs most relevant to ongoing pregnancy status. Three selected genes were verified by qMSP in an independent set of 30 pregnancy and 35 nonpregnancy mid-secretory phase cervical secretion samples. Different sets of selected DMPs or genes were used in four ML algorithms for predicting ongoing pregnancy in the two datasets (array and qMSP datasets). RF: random forest, NB: naïve Bayes, SVM: support vector machine, KNN: k-nearest neighbors, NP: nonpregnancy, P: pregnancy, DMPs: differentially methylated probes, WOI: window of implantation, qMSP: quantitative methylation-specific PCR, CV: cross-validation.

Endometrial WOI Genes and Their Promoter Probes
One hundred and fifty-eight WOI genes were selected from the endometrial singlecell transcriptomic profiles. These genes belong to three groups, including genes whose expressions determine the endometrial cycle phase and subphase (i.e., top phase and subphase-defining genes), transcriptional factor coding genes, and secretory protein coding genes associated with the entrance and/or exit of the WOI (Supplementary Table S1). A total of 2708 promoter probes of the 158 WOI genes were extracted from the mid-secretory cervical secretion methylomic profiles (Supplementary Table S2a,b). Figure 1. Study logistics. A total of 158 WOI genes were selected from the single cell endometrial transcriptomic profiles. In total, 2708 promoter probes of the 158 WOI genes were extracted from methylomic profiles generated by an EPIC 850K BeadChip array, from 31 pregnancy and 37 nonpregnancy mid-secretory phase cervical secretion samples. Probes were ranked by p-value to select 152 DMPs. These DMPs were used in the following refinement step using the Boruta algorithm to identify the 15 DMPs most relevant to ongoing pregnancy status. Three selected genes were verified by qMSP in an independent set of 30 pregnancy and 35 nonpregnancy mid-secretory phase cervical secretion samples. Different sets of selected DMPs or genes were used in four ML algorithms for predicting ongoing pregnancy in the two datasets (array and qMSP datasets). RF: random forest, NB: naïve Bayes, SVM: support vector machine, KNN: k-nearest neighbors, NP: nonpregnancy, P: pregnancy, DMPs: differentially methylated probes, WOI: window of implantation, qMSP: quantitative methylation-specific PCR, CV: cross-validation.

Endometrial WOI Genes and Their Promoter Probes
One hundred and fifty-eight WOI genes were selected from the endometrial singlecell transcriptomic profiles. These genes belong to three groups, including genes whose expressions determine the endometrial cycle phase and subphase (i.e., top phase and subphase-defining genes), transcriptional factor coding genes, and secretory protein coding genes associated with the entrance and/or exit of the WOI (Supplementary Table S1). A total of 2708 promoter probes of the 158 WOI genes were extracted from the mid-secretory cervical secretion methylomic profiles (Supplementary Table S2a,b).

Selection of Differentially Methylated Probes for Predicting Ongoing Pregnancy
From 2708 promoter probes in 158 WOI genes, 152 probes in 87 genes were found to have significant differences in methylation between the pregnancy and nonpregnancy sample groups (Supplementary Table S3, Figure 2). The best model from the four ML algorithms (RF, NB, SVM, and KNN) using these 152 DMPs for predicting ongoing pregnancy in the array dataset achieved accuracy rates of 80.65%, 83.44%, 83.47%, and 69.03%, respectively (Supplementary Table S4), and AUC values of 0.85, 0.87, 0.88, and 0.79, respectively (Supplementary Figure S2).

Selection of Differentially Methylated Probes for Predicting Ongoing Pregnancy
From 2708 promoter probes in 158 WOI genes, 152 probes in 87 genes were found have significant differences in methylation between the pregnancy and nonpregnanc sample groups (Supplementary Table S3, Figure 2). The best model from the four ML a gorithms (RF, NB, SVM, and KNN) using these 152 DMPs for predicting ongoing pre nancy in the array dataset achieved accuracy rates of 80.65%, 83.44%, 83.47%, and 69.03% respectively (Supplementary Table S4   All DMPs were ranked by importance level compared with the randomly generated shadow attributes via BA. The results of the variable selection process were demonstrated by variable important ranking and classifier run history before (Supplementary Table S5a represent nonpregnancy and pregnancy samples, respectively. Methylation levels are presented low (dark blue) to high (dark red). All DMPs were ranked by importance level compared with the randomly genera shadow attributes via BA. The results of the variable selection process were demonstra by variable important ranking and classifier run history before (Supplementary Table S Supplementary Figure S3a,b) and after the tentative fix (Supplementary Table S6b   The best model from each of the four ML algorithms (RF, NB, SVM, and KNN) using these 15 DMPs for predicting ongoing pregnancy in the array dataset yielded accuracy rates of 83.53%, 85.26%, 85.78%, and 76.44%, respectively, and AUC values of 0.90, 0.91, 0.89, and 0.86, respectively (Table 2, Figure 3c).

Verification of Three Selected Candidate Genes for Predicting Pregnancy Outcome
Three selected genes, SERPINE1, SERPINE2, and TAGLN2, were verified using the independent set (qMSP sample set) of 30 pregnancy and 35 nonpregnancy cervical secretion samples.
In the array sample set, the methylation level (β-value) of each gene promoter probe differed significantly between the two sample groups. SERPINE1 (cg19722814) and TAGLN2 (cg03138854) had higher methylation levels, whereas SERPINE2 (cg19371203) had a lower methylation level in pregnancy compared with nonpregnancy samples (Figure 4a). Predicting ongoing pregnancy in the array set using the DMP set with the best models via RF, NB, SVM, and KNN achieved accuracy rates of 73 Figure S4).
In the qMSP sample set, the between-sample group methylation level difference trend in each gene was similar to that in the array sample set, and the differences remained statistically significant for SERPINE2 and TAGLN2 (Figure 4b). The best model from RF, NB, SVM, and KNN using the three-gene combination achieved accuracy rates of 71.46%, 80.06%, 80.72%, and 80.68%, respectively, and AUC values of 0.79, 0.84, 0.83, and 0.82, respectively (Table 3, Figure 4c).

Discussion
To the best of our knowledge, this is the first study to report that the methylation status of single cell level-identified WOI genes from cervical secretions differ between IVF cycles that lead to pregnancy versus nonpregnancy. These data show that ML algorithms using differentially methylated WOI genes can accurately predict ongoing pregnancy. Our findings support further studies using DNA methylation markers from cervical secretions as a noninvasive approach for identifying receptive cycles to potentially determine precision embryo transfer and help improve IVF success.
Previously, using a genome-wide analysis of methylation profiles from cervical secretions in embryo transfer cycles, we showed that unsupervised clustering using 2000 DMPs could correctly classify 86% of samples [34]. Consistent with that evidence, the results herein support the conclusion that DNA methylation changes detected from cervical secretions are highly relevant to the IVF-ET outcome. A total of 152 DMPs in 87 genes were found to have significantly different methylation levels between pregnancy and nonpregnancy samples. Using these DMPs with the four ML algorithms predicted ongoing pregnancy with accuracy rates from 69.03% to 83.47%, and AUC values from 0.79 to 0.88. Further refinement showed that 15 DMPs in 14 genes were most relevant to ongoing pregnancy status. Furthermore, the four ML algorithms based on these DMPs achieved good-to-excellent prediction performance, with AUC values from 0.86 to 0.91 and accuracy rates from 76.44% to 85.78%.
Endometrial DNA methylation plays an important role in embryo implantation. Methylation changes in genes involved in inflammatory response regulation, adhesion molecule synthesis, transcriptional factors, and tissue remodeling in the endometrium have been associated with poor implantation outcomes in IVF treatment [11,14,15,21,22]. Herein, we utilized endometrial WOI genes, which have been comprehensively identified at the single cell level, to investigate methylation changes using cervical secretions. Among 14 WOI genes, the methylation statuses of which were identified as most relevant to ongoing pregnancy status, nine (MTF1, ZNF292, ZBTB20, TCF4, CTSA, DEFB1, GRN, SERPINE1, and THBS1) were found in unciliated endometrial epithelial cells, and the other five (BMP2, SFRP1, STAT3, SERPINE2, and TAGLN2) in stromal fibroblasts. Expression levels of these genes differ between the WOI and other menstrual cycle phases or subphases [9].
Although the biological functions of these 14 candidate WOI genes in the endometrium are not fully understood, eight were previously shown to be involved in implantation and decidualization. THBS1 encodes for thrombospondin-1, which is involved in tissue remodeling [37]. In humans, THBS1 is upregulated in receptive compared with pre-receptive endometria [38], and downregulated in patients with recurrent implantation failure [39]. Secreted frizzled-related protein 1 (SFRP1) is a modulator/inhibitor of Wnt/Fz sFRP1, which inhibits cell proliferation. SFRP1 is more abundant in stromal cells, and its expression is higher during the proliferative compared with the secretory phase [40]. The gene was upregulated in clomiphene citrate treatment cycles, and may be the major cause of thin endometrium [41]. Bone morphogenetic proteins (BMPs) are multi-functional growth factors that belong to the transforming growth factor beta superfamily [42]. BMP2 regulates endometrial remodeling during the decidualization process via different signaling pathways (e.g., ALK3-SMAD1/5, cAMP/PKA/Wnt4, Wnt4/β-catenin [43][44][45][46][47]), and its expression may be influenced by progesterone [48]. TCF4 and STAT3 encode for transcriptional factors and are involved in cell growth and differentiation in different tissues, including human endometrium. Impaired STAT3 expression is a possible cause of altered endometrial receptivity and decidualization via different pathways [49][50][51][52][53][54]. Both STAT3 and TCF4 are downregulated in the decidua of patients with recurrent spontaneous abortion compared with those with normal pregnancy [55]. In a mouse model, an impaired LIF/STAT3 pathway resulted in the failure of decidualization and embryo implantation [56]. SERPINE1, SERPINE2, and TAGLN2 are secretory protein coding genes. SERPINE1 encodes for the plasminogen activator inhibitor-1 protein, which is well known for its roles in stromal cell remodeling in different tissues [57]. In the endometrium, its expression in decidual cells is influenced by steroid hormones [58][59][60]. This protein, in turn, regulates the proteolytic degradation of the extracellular matrix and fibrinolysis in endometrial cells, which are essential for decidualization and the invasion of the trophoblast during implantation [61,62]. In addition, polymorphisms of the gene have been associated with implantation failure [63][64][65]. SERPINE2, also known as protease nexin-1, belongs to the serine protease inhibitor (SERPIN) superfamily. SERPINE2 is the most upregulated polysaccharide intercellular adhesin in the mouse endometrial epithelium [66] during estrous and in human mid-secretory phase endometrium [67], supporting its role in endometrial remodeling during the WOI. TAGLN2 is upregulated in the receptive, compared with the pre-receptive, endometrium [68], and is involved in regulating cell invasion, migration, and differentiation [69]. In a rabbit model, increased TAGLN2 expression at implantation sites in early pregnancy was under the influence of live embryo(s) and elevated steroid hormones [70]. Cumulatively, these genes have the potential to serve as key regulators of embryo implantation, so that methylation alterations may dysregulate their functions during the WOI and affect implantation outcomes. The roles of three other transcriptional factors (ZNF292, ZBTB20, and MTF1) and three other secretory proteins (CTSA, DEFB1, and GRN) in implantation have not yet been elucidated and thus require further investigation.
Consistent with our previous study that supported the use of cervical secretion as a proxy for assessing endometrial receptivity based on pregnancy status [34], we have here provided additional evidence supporting this noninvasive approach by using differentially methylated WOI genes to predict ongoing pregnancy. Although the noninvasive or minimally invasive assessment of endometrial receptivity has been demonstrated using molecular markers, including transcriptomics, epigenomics, proteomics, and metabolomics from endometrial fluids, each has limited performance and needs further validation [71,72]. Moreover, previous attempts using clinical features in ML models to predict IVF outcome have demonstrated modest performance [73][74][75]. Herein, four ML algorithms using 15 DMPs in 14 genes demonstrated the potential for predicting ongoing pregnancy. In addition, methylation levels of three genes (SERPINE1, SERPINE2, and TAGLN2) were verified in an independent sample set that showed consistent methylation difference trends between pregnancy and nonpregnancy samples. Four ML algorithms using three genes have also achieved promising performance in sample classification. These results reaffirm that methylation changes in WOI genes from cervical secretions are associated with endometrial status and have potential as markers for predicting IVF-ET outcomes.
This study had some limitations. First, the sample sizes were relatively small in both the discovery and verification sets. However, the predictive performance was generated from the repeated cross-validation procedure that reduced overfitting and showed the potential for generalizing the proposed algorithms using these DNA methylation markers to other populations. Although the best model from each ML algorithm using different combinations of the candidate methylation markers achieved promising performance, the utility of these models needs further evaluation. Studies with larger samples would help validate the predictive performance of these candidate genes. In addition, using the candidate genes in combination with important clinical factors such as women's age and embryo quality may result in more precise prediction. Second, we used only morphological criteria to assess embryo quality. Implantation failure may have resulted from abnormal embryos, which may have caused some misinterpretation in these findings. Testing these DNA methylation markers in only those cycles when euploid embryos are transferred would rule out pregnancy failure from impaired quality embryos and further confirm the predictive performance of their differentially methylated status. Third, cervical secretions were collected immediately before embryo transfer, which is unsuitable for clinical use. Nevertheless, it is worth further studying these candidate genes using late proliferative phase cervical secretions to investigate how their methylation status differs between pregnancy and nonpregnancy cycles, and whether they can be used to predict embryo transfer outcomes because it was evident that the endometrial DNA methylome remains stable during the menstrual cycle up to the late-secretory phase [76]. An investigation with a larger sample size is now planned to validate these methylation markers using late proliferative phase cervical secretions. The confirmation of optimal DNA methylation markers and the development of predictive models are expected to provide timely information on the probability of achieving pregnancy, allowing clinicians and patients to make more well-informed decisions about embryo transfer.

Study Participants and Clinical Samples
This study was approved by the joint institutional review board of Taipei Medical University (TMU-JIRB number: N201703072). Written informed consent was obtained from all participants with the approval of the Ethics Committee.
The participants in the present study were women undergoing embryo transfer during IVF. Cervical secretion samples were collected from eligible participants at multiple IVF centers between August 2018 and May 2020. Standard treatment protocols were used at all IVF centers. Participants had no contraindications for IVF, endometrial thickness greater than 7 mm on the embryo transfer day, and at least one fresh or frozen embryo scheduled for transfer. Embryo quality was assessed according to the Gardner and Schoolcraft grading system [77], as described in our previous study [34]. The participants' clinical characteristics were recorded. Both fresh and frozen embryo transfer cycles were eligible for this study. Fresh embryos were transferred after IVF/ICSI following ovarian stimulation and oocyte retrieval. In frozen embryo cycles, both natural endometrial cycles and cycles with artificial endometrial preparation using hormone replacement were employed. Women with endometriosis or adenomyosis were pretreated with gonadotropin-releasing hormone for at least 1 month for pituitary suppression. We collected one cervical secretion sample from each participant during her embryo transfer, immediately before the transfer catheter was inserted into the cervical canal, as described in our previous study [34]. After embryo transfer, the women were followed for pregnancy assessment. Cervical secretion samples were classified into the pregnancy or nonpregnancy groups according to the presence of at least one viable intrauterine fetus at 12 weeks of gestation, as described previously [34]. Herein, we used two independent cervical secretion sample sets: one to generate the methylation profiles by using an Illumina 850 K BeadChip array (i.e., array sample set or discovery set), which was then used to extract methylation data on WOI genes, and another to verify the methylation levels of selected candidate genes by quantitative methylationspecific polymerase chain reaction (i.e., qMSP sample set or verification set).

DNA Preparation
The collection of cervical secretions and DNA extraction were performed as described in our previous study [34]. Briefly, cervical secretions were collected using a cotton wool ball, which was placed in a 50 mL centrifuge tube and stored at 4 • C. The cotton wool ball was rinsed with 1 mL phosphate-buffered saline. This solution was then centrifuged at 1000× g for 10 min to collect the flowthrough. Genomic DNA was extracted from the flowthrough using the QIAamp DNA Mini Kit (QIAGEN, Hilden, Germany) and bisulfiteconverted using the EZ DNA Methylation Kit (Zymo Research Corp., Irvine, CA, USA), in accordance with the manufacturers' protocols.

Extraction of WOI Genes' Promoter Probes from Cervical Secretion Methylomics Profiles
Methylomic profiles were generated from the samples in the discovery set using the Infinium MethylationEPIC BeadChip array (Illumina, San Diego, CA, USA), which measures the methylation levels of around 850,000 CpG sites according to Illumina's standard protocol. In the system, the methylation level of each probe was represented by a β-value. Quality control and normalization for methylation levels derived from type I and type II probes were performed using the beta-mixture quantile (BMIQ) method in the chip analysis methylation pipeline package of R [78], as described previously [34]. Methylation profiles, after normalization and removing probes with single-nucleotide polymorphism, were used for data extraction.
We selected WOI associated genes which were identified from the single-cell transcriptomic profiles, which were previously described [9]. Methylation values (β-values) of promoter probes in each WOI gene were extracted from the mid-secretory phase cervical secretion methylomic profiles.

Measurement of Methylation Levels by Quantitative Methylation-Specific Polymerase Chain Reaction
A panel of selected genes with different importance levels ranked by BA algorithm was used for verification. We measured the methylation levels of these genes with qMSP in the independent set of cervical secretion samples (qMSP sample set) following the protocol described in our previously published studies. Briefly, we designed the primers (Supplementary Table S7) using Oligo 7.0 Primer Analysis software (Molecular Biology Insights, Inc., Colorado Springs, CO, USA). qMSP assays were performed on the Light-Cycler 480 System (Roche, Indianapolis, IN, USA) [31]. Each gene was tested twice in all samples. We normalized the total input DNA amount in each qMSP reaction using the unmethylated type II collagen gene (COL2A1) as a reference. DNA methylation levels were estimated by the difference in crossing point (∆Cp) values, defined by the following formula: Cp of target gene − Cp of COL2A1 [79]. Samples with test results showing a Cp value of COL2A1 > 36 for each gene were defined as the absence of the template DNA [33]. Herein, the relative methylation levels measured by qMSP are presented as 2 −(∆Cp) .

Statistical and Machine Learning Analyses
The array dataset consisted of all WOI gene promoter probes extracted from methylomic profiles, which were generated from the array set of cervical secretion samples (array set). The dataset was used to select variables and train and evaluate the four ML algorithms using different sets of differentially methylated probes (DMPs) for predicting ongoing pregnancy.

• qMSP (verification) dataset
The qMSP dataset consisted of the selected gene panel, the methylation levels of which were verified by qMSP in the independent set of mid-secretory phase cervical secretion samples (qMSP set). This dataset was used to train and evaluate the performance of the ML algorithms using the gene panel for predicting ongoing pregnancy.
In both datasets, methylation levels of the WOI gene promoter probes were numerically categorized. The binary outcome variable reflected ongoing pregnancy status after embryo transfer, as described above. The positive class in predictive models was defined as "pregnancy" and the negative class as "nonpregnancy". Clinical characteristics of the samples were obtained and processed as continuous or categorical variables, as appropriate.

Statistical Analyses
Statistical and ML analyses were conducted, and plots created, using SPSS Version 26.0 (IBM Corp., Armonk, NY, USA), and different packages implemented in R (version 4.1.1) [80]. Bivariate analyses were performed for all variables, including clinical characteristics and promoter probes, to test for differences between pregnancy and nonpregnancy sample groups. The chi-squared test or Fisher's exact probability test were applied to categorical variables, and the nonparametric Mann-Whitney U test was applied to continuous variables. A p-value < 0.05 was considered statistically significant. We used the R pheatmap package to generate a heatmap to visualize the probes with methylation levels that differed significantly between the two sample groups [81].

Variable Selection
Variable selection is an important ML step to identify the most relevant set of variables for outcome prediction (herein, we use the terms 'variable', 'feature', and 'attribute' interchangeably). First, bivariate analyses were conducted to identify variables that differed significantly between the sample groups; these were used for further refinement. Next, the Boruta algorithm (BA), a tree-based wrapper feature selection algorithm, was used to select the variables most relevant to ongoing pregnancy status. Briefly, BA calculates importance scores for each attribute in the algorithm and compares these with scores for randomly generated shadow attributes. The attributes with importance levels denoted by Z-scores that are higher than those of all random shadow attributes are deemed 'important'. The shadow attributes are then removed from the process, and the procedure is repeated until the importance assessment is completed for all attributes, or the algorithm is stopped based on a predefined number of runs [82]. Herein, we set a limit of 500 BA runs. In addition, a tentative rough fix step was applied in the BA procedure to make a final decision on variables that remained inconclusive (tentative variables) after all initial iterations. The process was performed using the "Boruta" package in R [82].

Model Train and Evaluation
In model training and evaluation, the binary outcome variable was defined as a 2level factor, while numerical variables were centered and scaled using the preProcess function in the Caret package in R [83]. Different combinations of selected variables were then used as predictors in four ML algorithms (random forest [RF], naïve Bayes [NB], support vector machine [SVM], and k-nearest neighbors [KNN]) to predict ongoing pregnancy. One hundred repetitions of a fivefold cross-validation were conducted to create 500 held-out test sets used to select the best hyperparameter for each algorithm and assess model performance using the Caret package in R [83]. Hyperparameter tuning in the repeated cross-validation procedure was performed using the default search in the "train" function in the Caret package to select the best model for each algorithm. Predictive performance metrics, including accuracy, positive predictive value, negative predictive value, sensitivity, and specificity, were calculated for the final best model using each algorithm with 500 resamples using the confusionMatrix function in the Caret package in R. Receiver operating characteristic (ROC) curves were constructed and area under the ROC curve (AUC) values were calculated from sensitivity and specificity values for each threshold from the repeated cross-validation procedure using the pROC package in R [84]. We focused on accuracy and AUC as the main metrics of predictive performance of the four ML models.

Conclusions
The findings of this study suggest that methylation changes in WOI genes, detected noninvasively from cervical secretions, can be used to predict ongoing pregnancy in embryo transfer cycles. Methylation changes in these critical genes may dysregulate endometrial receptivity during the WOI, impacting embryo transfer outcomes. Future studies using DNA methylation markers detected from late proliferative cervical secretions may provide a novel noninvasive approach for precisely predicting pregnancy ahead of embryo transfer. Such timely information provided by DNA methylation marker-based predictive models would be clinically valuable for precision embryo transfer and improving IVF outcomes.