Immune cell infiltration results showed that both OSA and AS were closely associated with immune cell infiltration, and ERRFI1 was closely associated with cellular immunity. Here, ERRFI1 is linked to obstructive sleep apnea syndrome.