Introduction

Helicobacter pylori (H. pylori), a Gram-negative bacterium that colonizes the human gastric mucosa, it has a well-established causal association with peptic ulcer disease, gastric mucosa-associated lymphoid tissue (MALT) lymphoma, and non-cardia gastric adenocarcinoma1,2. Long-term cohort studies demonstrate that eradication therapy reduces the incidence of gastric cancer by 47%, supporting its role as a primary prevention strategy3. However, rising rates of antibiotic resistance have fundamentally compromised empirical treatment frameworks. These resistance profiles correlate strongly with reduced eradication success, with clarithromycin-based regimens achieving suboptimal eradication rates of 65–75% in high-resistance areas compared to > 90% in areas with low resistance4,5. This escalating therapeutic challenge underscores the imperative for precision medicine approaches to antimicrobial selection, reliant on accurate and accessible resistance profiling technologies.

Current international guidelines6,7 advocate for culture-based or molecular resistance testing of gastric biopsy specimens to inform treatment strategies in regions with high antibiotic resistance prevalence. Although this approach achieves a diagnostic yield exceeding 95% under optimal conditions, it is constrained by inherent limitations stemming from its invasiveness8. Endoscopic biopsy necessitates specialized endoscopic infrastructure, skilled personnel, and significant healthcare resources, which may impede implementation particularly in resource-limited environments9. Moreover, in cases of initial eradication failure, repeated endoscopies for susceptibility testing pose additional burdens and risks to patients. Non-invasive modalities such as urea breath tests and fecal antigen immunoassays demonstrate high sensitivity and specificity for initial detection of infection, yet they do not furnish antibiotic susceptibility information10. Serologic antibody testing remains valuable in epidemiological surveillance but lacks the capacity to discriminate between active and resolved infection11. The unavailability of routine resistance profiling compels reliance on empirical treatment protocols, thereby perpetuating a cycle of therapeutic failure, recurrent antibiotic exposure, and escalation of resistance.

Nucleic acid-based detection of antimicrobial resistance mutations represents a critical advance in the management of H. pylori infection12. Quantitative polymerase chain reaction (qPCR)-based assays enable rapid identification of resistance determinants within 4–6 h, significantly reducing the turnaround time compared to the 7–14 days required for conventional culture-based susceptibility testing13. For clinical, it is crucial to validate these genotypic methods against the phenotypic reference standard of culture-based antimicrobial susceptibility testing (AST) and to establish consistent, optimized protocols across different samples. For clarithromycin and levofloxacin, the detection of specific point mutations by qPCR has been demonstrated to exhibit high concordance with phenotypic AST, establishing genotypic testing as a reliable and rapid alternative for guiding clinical decisions14. While gastric biopsy samples remain the reference standard, non-invasive sampling approaches have been refined15. Gastric juice, a long-available but underutilized minimally invasive method, demonstrates high genomic DNA yield and achieves sensitivity and specificity exceeding 90% for clarithromycin resistance detection16. Similarly, stool-based qPCR offers a completely non-invasive alternative, though with greater variability in reported accuracy. This performance discrepancy likely stems from inherent technical challenges such as DNA fragmentation during intestinal transit, PCR inhibition by fecal constituents, and heterogeneity in sampling protocols17. Prior pilot investigation18 involving115 patients demonstrated moderate to strong agreement between stool and mucosal qPCR in detecting resistance gene mutations (κ = 0.74 for clarithromycin; κ = 0.79 for levofloxacin).

Although promising, these initial findings were limited by the cohort size and lack of parallel gastric juice analysis. To address these gaps, this study conducted a prospective paired analysis of gastric mucosa, gastric juice, and stool samples from the same Chinese patients, using a specific commercial qPCR assay to detect genotypic resistance to clarithromycin and levofloxacin. This design allows for a comprehensive evaluation of diagnostic performance and concordance across sample types in a population with high antibiotic resistance rates, thereby providing novel insights into non-invasive resistance profiling.

Methods

Ethical approval

This study adhered to the Consolidated Standards of Reporting Trials (CONSORT) guidelines. Written informed consent was obtained from all participants prior to enrollment. The study protocol received approval from the Institutional Ethics Board of Civil Aviation General Hospital in Beijing, China (Approval No. 2024-L-K-79) and was conducted in compliance with the principles of the Declaration of Helsinki. The trial was prospectively registered with the Chinese Clinical Trial Registry (www.chictr.org.cn; Registration No. ChiCTR2400084465).

Study design and participant

A prospective diagnostic concordance study was conducted from May 20, 2024, to November 30, 2024. Participants aged 18–75 years were enrolled, requiring confirmation of H. pylori infection by both a positive13C- or14C-urea breath test (UBT) and gastric mucosal histology using Warthin-Starry staining. Definitive confirmation required concordant positive results from both assays; those with discrepant results were excluded. Exclusion criteria included: H. pylori eradication within 6 months; use of proton pump inhibitors, H2-receptor antagonists, antibiotics, bismuth, or gastromucosal protectants within 4 weeks; repeated (≥ 5 courses/year) or prolonged (≥ 10 weeks continuously) use of macrolides or penicillins; allergy or contraindication to trial medications; history of malignancy or upper gastrointestinal surgery; comorbid upper gastrointestinal diseases; acute gastrointestinal bleeding within one week; need for anticoagulants during the trial; severe uncontrolled cardiac, hepatic, renal, or hematologic disorders; pregnancy, lactation, or planned pregnancy within 6 months; drug/alcohol abuse within one year; or any other investigator-determined unsuitability.

Sample collection

Sample collection and processing were performed under a standardized protocol. Under endoscopic guidance, disposable biopsy forceps were used to obtain two specimens from both the gastric antrum and corpus from each participant. During gastrointestinal endoscopy, 5 mL of fasting gastric fluid specimens were aspirated from the gastric fundus and transferred directly into a sterile collection via the endoscope’s suction base. All specimens were processed following a standardized stabilization protocol, with both mucosal biopsies and gastric juice aliquots being snap-frozen in liquid nitrogen within 30 min post-collection and subsequently stored at − 80 °C. Fecal samples were self-collected within 3 days after gastroscopy. To standardize collection and ensure sample quality, participants were instructed to procure specimens during their first morning bowel movement. A standardized aliquot of approximately 0.5 g of stool was collected using fecal DNA storage tubes (CW2654, CwBiotech, Beijing, China). All samples were subsequently transported to the laboratory, with a stipulated transit time not exceeding 72 h post-collection.

qPCR for genotypic resistance analysis

Genomic DNA was extracted from collected specimens of gastric mucosa, gastric juice, and stool using the QIAamp DNA Mini Kit (56304, Qiagen, Hilden, Germany) according to the manufacturer’s protocol. The same commercial qPCR assay (Jiangsu Mole Bioscience Co., Ltd., China) was consistently applied across all three sample types (gastric mucosa, gastric juice, and stool) for the detection of H. pyloriureB gene and resistance mutations associated with clarithromycin (23 S rRNA: A2143G, A2143C, A2144G) and levofloxacin (gyrA: 261 A, 261G, 260 T, 271 A, 271 T, 272G). This kit has been previously validated for stool samples in pilot study18, and the standardized approach, utilizing identical primer-probe sets, amplification conditions, and pre-defined Ct thresholds for all samples, was employed to ensure comparability and minimize technical variability across the different sample types.

Utilizing ROC curve analysis, the threshold Ct values for this kit were determined as follows: 35.04 for the FAM channel (23 S rRNA gene mutation), where Ct ≤ 35.04 indicates a positive mutation; and 35.73 for the HEX/VIC channel (gyrA gene mutation), where Ct ≤ 35.73 is indicative of a gyrA gene mutation. Gastric mucosal specimens were employed as the reference standard for genotypic resistance profiling. Resistance gene mutations to clarithromycin and quinolones were detected by pre-analytical procedures were standardized to minimize variability. qPCR was performed by operators blinded to reference results, with batch randomization to avoid run-order bias. Post-analytical quality assessment included independent re-examination of 10% of randomly selected amplification curves.

Statistical analysis

Statistical analyses were conducted using SPSS v26.0, categorical variables were presented as percentages or frequencies, while continuous variables were expressed as mean ± standard deviation. MedCalc software (version 22.016) was employed to calculate the sensitivity, specificity, accuracy, positive predictive value (PPV), negative predictive value (NPV), and Cohen’s kappa. Paired statistical analyses were conducted to compare the diagnostic performance of gastric juice and stool samples against the gastric mucosa reference standard. McNemar’s test was used to compare paired sensitivities and specificities. The statistical significance of the difference between two dependent kappa coefficients was assessed using the method described by Cohen. Receiver operating characteristic (ROC) curves were constructed, and the areas under the curves (AUCs) were compared using DeLong’s test. All statistical tests were two-sided, and a P value < 0.05 was considered statistically significant. Exact binomial 95% confidence intervals (CIs) were calculated for the kappa coefficient, with kappa values categorized as follows: >0.90, almost perfect; 0.80 to 0.90, strong; 0.60 to 0.79, moderate; 0.40 to 0.59, weak; 0.21 to 0.39, minimal; and 0 to 0.20, none19.

Results

Study characteristics

The patient flowchart is depicted in Figs. 1 and 218 patients with confirmed H. pylori infection were enrolled. The cohort comprised 97 males (44.5%) and 121 females (55.5%) with a mean age of 47.56 ± 14.71years (range 19–75 years). Gastric mucosal samples identified H. pylori infection in 208 cases (95.4%), with clarithromycin resistance observed in 124 cases (56.9%) and levofloxacin resistance in 72 cases (33.0%), thereby establishing the reference standard for subsequent analyses. All participants provided complete sets of gastric mucosa, gastric juice, and stool samples for comparative evaluation. Baseline characteristics of H. pylori-positive patients are detailed in Table 1.

Fig. 1
Fig. 1The alternative text for this image may have been generated using AI.
Full size image

Flowchart of this study.

Table 1 Baseline characteristics.

Detection of H. pylori infection by qPCR

As summarized in Table 2, gastric juice demonstrated superior performance over stool in detecting H. pylori compared to the gastric mucosa. The positive detection rate was 95.4% (208/218) for gastric juice versus 90.4% (197/218) for stool. The sensitivity was significantly higher for gastric juice (97.6%; 95% CI 94.6–99.1) than for stool (91.3%; 95% CI 86.8–94.6; P = 0.003). The overall agreement with the reference standard was 95.0% (95% CI 91.1–97.2) for gastric juice, which was higher than that for stool (88.5%; 95% CI 83.5–92.3). The agreement was weak for gastric juice (kappa = 0.476; 95% CI 0.211–0.741) but none for stool (kappa = 0.025; 0–0.089; z = 3.12, P = 0.002). ROC curve analysis revealed that gastric juice (AUC = 0.738, 95% CI 0.675–0.801) had a significantly larger AUC than stool (AUC = 0.606, 95% CI 0.532–0.680; P < 0.001) for detecting H. pylori infection.

Profiling of antibiotic resistance genes by qPCR

The comparative performance of stool and gastric juice samples for detecting H. pylori antibiotic resistance against the gastric mucosa reference standard is summarized in Table 3. The prevalence of clarithromycin resistance gene detection was higher when assessed from gastric juice (57.3%; 125/218) than from stool (50.5%; 110/218). Similarly, levofloxacin resistance was more frequently detected in gastric juice (28.4%; 62/218) compared to stool (23.9%; 52/218).

Table 2 H. pylori detection concordance with gastric mucosa reference.
Table 3 Genotypic resistance concordance with gastric mucosa reference.

For clarithromycin resistance, sensitivity was significantly higher in gastric juice (87.1%; 95% CI 80.1–92.0) than in stool (72.6%; 95% CI 64.0–79.9, P = 0.001), with specificities of 82.9% and 79.6%, respectively. Agreement with the reference standard was moderate for gastric juice (kappa = 0.691; 95% CI 0.592–0.790) and weak for stool (kappa = 0.504; 95% CI 0.392–0.616, P = 0.004) The AUC for gastric juice (0.850, 95% CI 0.798–0.902) was also significantly greater than that for stool (0.761, 95% CI 0.700–0.822; P = 0.002).

For levofloxacin resistance gene detection, sensitivity was also higher in gastric juice (70.8%; 95% CI 59.2–80.3) than in stool (61.1%; 95% CI 49.5–71.6, P = 0.049), while both sample types showed high specificity (gastric juice: 92.3%; stool: 94.5%). Agreement was moderate to substantial, with gastric juice performing better (kappa = 0.656; 95% CI 0.539–0.773) compared to stool (kappa = 0.598; 95% CI 0.478–0.718, P = 0.156). The AUCs for gastric juice and stool were 0.815 (95% CI 0.754–0.877) and 0.778 (95% CI 0.712–0.844), respectively, with no statistically significant difference (P = 0.112).

Discussion

Gene detection technologies have provided rapid, streamlined, and precise approaches for genotypic resistance analysis, replacing conventional antimicrobial susceptibility testing. This development has enhanced the personalized selection of eradication therapy for H. pylori infections. Our findings are consistent with recent advances in molecular resistance profiling. Moss et al.8 reported comparable performance between stool and gastric biopsy samples for detecting H. pylori antibiotic resistance using next-generation sequencing, underscoring the feasibility of stool-based genotypic testing. Similarly, Vasapolli et al.20 highlighted the utility of targeted PCR-based mutation detection in gastric juice samples for guiding tailored H. pylori eradication therapy. In this study, qPCR was employed to detect H. pylori infection and genotypic resistance to clarithromycin and levofloxacin, while a direct comparison of three matched sample types demonstrated that gastric juice exhibits superior sensitivity and higher agreement with mucosal genotypes than stool.

The selection of a diagnostic assay for H. pylori infection depends on sensitivity, specificity, reproducibility, turnaround time, and cost21. Reported performance characteristics including serology (sensitivity 85%, specificity 79%); urea breath test (75–100%, 77–100%); stool antigen test (67–100%, 61–100%); rapid urease test (75–100%, 84–100%); histopathology (66–100%, 94–100%); culture (55–96%, 100%); conventional PCR (75–100%, 84–100%); and nested PCR (100% for both)22,23. Fecal samples are widely appreciated for their ease of acquisition, yet DNA extraction therefrom remains technically challenging17. The present study showed that gastric juice had exhibited superior diagnostic performance over stool for the detection of H. pylori. Specifically, gastric juice had demonstrated higher sensitivity (97.6% vs. 91.3%), specificity (50.0% vs. 30.0%), and overall accuracy (95.0% vs. 88.5%). It also shown significantly better agreement with the reference method (kappa = 0.476) compared to stool (kappa = 0.025). The inferior performance of stool likely stemmed from the preanalytical limitations associated with fecal samples, including uneven distribution of pathogen DNA, presence of PCR inhibitors, and lower bacterial load, all contributing to reduced analytical sensitivity and higher rates of false-negative outcomes24. Gastric juice, obtained during a single endoscopic procedure, offers a minimally invasive alternative to mucosal biopsies for resistance profiling. This is particularly relevant when a patient is already undergoing endoscopy for other indications (e.g., dyspepsia investigation), allowing for comprehensive diagnosis and resistance testing in one session without the need for additional invasive biopsies. These results suggesting that gastric juice could be considered a more robust diagnostic approach for H. pylori infection and clarithromycin resistance testing.

Our findings demonstrate that gastric juice collected during endoscopy exhibits high concordance with the mucosal reference standard for H. pylori detection and clarithromycin resistance profiling. First, gastric juice can serve as an excellent backup or complementary specimen. In instances where mucosal biopsies are insufficient, damaged during processing, or yield inconclusive results due to sampling error or patchy bacterial distribution, the simultaneously collected gastric juice provides a robust alternative for reliable genotypic resistance testing, thereby preventing the need for a repeat endoscopy. Second, establishing the validity of gastric juice against the gold standard in this endoscopic cohort paves the way for its use as a primary sample in subsequent patient management. For patients necessitating post-therapeutic surveillance or evaluation for the emergence of antimicrobial resistance, follow-up testing may be conducted through analysis of gastric juice aspirates obtained via nasogastric intubation, thereby circumventing the need for repeated endoscopic procedures. Additionally, gastric juice continuously collects exfoliated cells and bacteria from the entire stomach surface, potentially providing a more comprehensive representation of the intragastric H. pylori population and its resistance profile than multiple focal biopsies25,26. This might be particularly advantageous after treatment failure, where bacterial load can be low and distribution heterogeneous.

Clarithromycin constitutes a cornerstone of the standard triple therapy regimen employed for the eradication of H. pylori27. However, the increasing prevalence of clarithromycin resistance in numerous areas has established it as the primary of failure in first-line eradication therapies28. In China, primary resistance rates of H. pylori have recently been reported as 20%–50% for clarithromycin, 40%–70% for metronidazole, and 20%–50% for levofloxacin29,30. Contemporary international guidelines advise against empirical clarithromycin-based triple therapy in geographic areas where clarithromycin resistance exceeds the 15% threshold31. Clinically, tetracycline and furazolidone are often inaccessible and poorly tolerated, while metronidazole resistance remains high and the drug is classified as a WHO Group 2B carcinogen32,33. Thus, amoxicillin, clarithromycin, and levofloxacin remain the most widely used antibiotics in eradication regimens. Given high resistance to clarithromycin and levofloxacin, antimicrobial susceptibility testing is strongly recommended and has demonstrated superior efficacy compared to empirical therapy in instances of prior therapeutic failure, thereby curbing the progression of antimicrobial resistance34. Multiple randomized controlled trials have demonstrated that susceptibility-guided H. pylori eradication regimens achieve significantly higher eradication rates compared to empirical regimens based solely on prior treatment history35,36. Although traditionally conducted on gastric biopsy specimens, this method is constrained by suboptimal sensitivity and substantial laboratory infrastructure, which limit its widespread adoption and practicality. The need for repeated susceptibility testing in cases of therapeutic failure underscores the importance of developing less invasive yet accurate methods like gastric juice PCR.

PCR is the preferred method for detecting clarithromycin resistance in H. pylori, offering high sensitivity, specificity, speed, and cost-effectiveness. It allows simultaneous quantification of bacterial load and identification of resistance mutations, particularly suited for detecting single-nucleotide polymorphisms associated with clarithromycin and levofloxacin resistance37. Most tests still rely on invasively obtained gastric biopsies, as stool and gastric juice are susceptible to DNA degradation and contamination, affecting reliability38. Prior pilot study18 in 115 patients demonstrated moderate agreement between stool and mucosal qPCR for resistance detection (kappa = 0.74 for clarithromycin; kappa = 0.79 for levofloxacin). In contrast, the present study found lower agreement. This discrepancy may be attributed to several factors: the larger sample size in the current cohort, which increased heterogeneity and reduced κ values; differences in patient characteristics; and the self-collection and transport of stool specimens, introducing pre-analytical variations that could influence qPCR performance and agreement. Notwithstanding these challenges for stool samples, it is important to contextualize their performance. The observed weak/moderate agreement (kappa = 0.504–0.598) for resistance gene detection, coupled with high specificity (> 79.6%), indicates that a positive resistance result from a stool test is highly reliable. This suggests that stool-based qPCR can still serve as a non-invasive tool for initial resistance screening in settings where endoscopy is not feasible or desired, or for post-treatment monitoring.

The findings of this study established the superiority of gastric juice over stool for assessing H. pylori antimicrobial resistance genotypically. However, comprehensive validation against culture-based AST is essential to fully establish the clinical utility of genotypic resistance profiling. Gastric juice had yielded significantly higher resistance prevalence and superior sensitivity for both clarithromycin and levofloxacin, while maintaining high specificity. The substantially higher agreement with the reference standard for gastric juice indicates its greater reliability in reflecting the true resistance profile at the gastric mucosa. This is likely because gastric juice provides a more direct source of viable, metabolically active H. pylori, minimizing the dilution, degradation, and potential colonization resistance that may occur during intestinal transit and stool formation39. The high negative predictive value of gastric juice analysis is clinically40, as it enables more reliable exclusion of antimicrobial resistance when susceptibility is reported, thereby optimizing its role in guiding patient-specific eradication therapy. Therefore, our data support a stratified diagnostic strategy: when endoscopy is performed, gastric juice PCR is the preferred method for resistance determination. For a non-invasive approach, stool PCR, despite its lower sensitivity, offers a clinically useful option, as a positive result provides high-confidence detection of resistance.

This study has several limitations. First, and most notably, we did not perform culture-based AST, which is the established gold standard for defining phenotypic resistance. The absence of this direct comparison means that this study validates the concordance of sample types for genotypic profiling but does not independently quantify the correlation between the detected mutations and the phenotypic resistance outcome. This limits the direct clinical interpretability of our genotypic findings at the present stage. Second, the single-center design may restrict the generalizability of the findings with heterogeneous genetic backgrounds of H. pylori. Additionally, although we employed a standardized commercial qPCR kit across all sample types to ensure consistency, inherent differences in sample composition might still affect assay performance and contribute to the observed disparities between gastric juice and stool. This underscores the need for further optimization and validation of sample-specific protocols. Third, patients with discordant results between the UBT and Warthin-Starry staining were excluded to minimize false-positive or false-negative outcomes; in such cases of discrepancy, further confirmation via alternative methods or repeat testing after eliminating potential interfering factors is recommended. Fourth, only treatment-naïve H. pylori-infected patients were enrolled, as retreated individuals demonstrate substantially higher rates of secondary and cross-resistance, thereby limiting the applicability of antibiotic genotypic resistance testing.

Conclusion

This study simultaneously detected H. pylori infection, clarithromycin, and levofloxacin resistance genes across matched gastric mucosal, gastric juice, and stool samples. Evaluation by qPCR demonstrated that gastric juice exhibited higher concordance with gastric mucosa, particularly for infection detection and clarithromycin resistance genotyping. For levofloxacin, while gastric juice showed higher sensitivity, its overall diagnostic agreement and accuracy were not statistically superior to stool. While collected during endoscopy in this study, the diagnostic performance of gastric juice supports its role as a backup to mucosal biopsies and highlights its potential for use in subsequent, less invasive monitoring of antibiotic resistance. Future studies correlating these genotypic results with phenotypic AST outcomes are warranted to fully establish its clinical utility.