NOX4, CCDC80, COL1A2, HTRA1, and KLHL29 were identified as key genes by LASSO regression analysis, among which HTRA1 and KLHL29 showed a close association with immune system infiltration in DCM and obesity. This evidence concerns the gene COL1A2 and familial dilated cardiomyopathy.