Cell apoptosis was assessed by flow cytometry, and mast cell and Treg cell activities were analyzed by Transwell assays, histamine detection, and immunohistochemistry (IHC).<h4>Results</h4>Fos proto-oncogene (FOS), ribonucleotide reductase regulatory subunit M2 (RRM2), and RAD51 recombinase (RAD51) were identified as mast cell-related hub genes, all of which were upregulated in HP-induced gastritis mice. This evidence concerns the gene FOS and gastritis.