The classification of diseases has several important applications ranging from diagnosis and choice of treatment to demographics. To date, classifications have been successfully created manually, often within international consortia. Some groups of diseases, such as primary immunodeficiencies (PIDs), are especially hard to nosologically cluster due, on one hand, to the presence of a wide variety of disorders and, in contrast, because of overlapping characteristics. More than 200 PIDs affecting components of the innate and adaptive immune systems have been described. Clinical, pathological, and laboratory characteristics were collected and used to group PIDs. A consensus of at least five independent methods provided a novel classification of 11 groups, which revealed previously unknown features and relationships of PIDs. Comparison of the classification to independent features, including the severity and therapy of the diseases, functional classification of proteins, and network vulnerability, indicated a strong statistical support. The method can be applied to any group of diseases.