In conclusion, six feature genes were identified, which with AUC >0.70 showed excellent diagnostic value for T2DM, and thus were considered as hub genes of T2DM, including MSANTD1, RASL10A, SOX4, YTHDF3, ZNF497, and ZNF771. Here, YTHDF3 is linked to type 2 diabetes mellitus.