In the early 1950s, pediatricians and basic immunologists began to report exemplary cases of children presenting with life-threatening infections at infancy, including mucocutaneous candidiasis, recurrent pneumococcal infections, or widespread staphilococcal abscesses . The study of these so called experimenta naturae by using the most recent immunological techniques has led many outstanding clinicians to pioneer the emerging field of primary immunodeficiencies and to postulate the underlying immunopathogenesis of these conditions (Fig. 1). In 1922, Schultz et al.  reported a case of ‘Agranulocytic angina’ as the first case of severe neutropenia that might constitute the first recognized primary immunodeficiency. Thereafter, in 1950, Glanzmann and Rinker reported two related infants with candidiasis at rapid fatal course and lymphopenia; but the concomitant absence in the same subjects of immunoglobulins was observed only 8 yr later, which, hence, it was renamed, severe combined immunodeficiency (SCID). The discovery of antibody immunodeficiencies is universally credited to Colonel Bruton who found, using the Tiselius electrophoretic apparatus, that an 8-yr-old boy with numerous pneumococcal infections had no detectable gamma-globulin. While, a few years later in 1957, Good et al., reported four boys with abscesses and draining lymph nodes caused by staphylococci or Gram-negative bacteria that they called ‘Fatal granulomatous’ syndrome, eventually termed chronic granulomatous disease (CGD) . In the 1970s, the expanding understanding of immunology paradigms of phagocytes, B and T cell functions led to the discovery of several aspects of disease pathogenesis including the mechanisms of diminished NADPH oxidase activity of CGD patients or the discovery of giant granules in Chediak-Higashy syndrome. But it was over the next 40 years that the combined efforts of genetic and immunological studies have led the identification and systematic classification of primary immunodeficiencies. Since 1977, the increasing availability of the ‘Sanger method’ of sequencing DNA in research laboratories in early years and later on in clinical diagnosis laboratories resulted in the possibility to precisely identify the genetic basis of diseases in patients with Primary immunodeficiency (PID) and to evaluate experimental therapies that had become available, such us bone marrow transplantation and gene therapies. On the basis of these studies, detailed recommendations for the identification and management of the most common PID were developed by clinical societies and international disease registries .
PID diagnosis in the genetic Era
Gene discovery over the past four decades has led to the identification of no less than 200 molecular defects causing primary immunodeficiencies; common techniques include the use of a candidate gene approach, or, alternatively, of unbiased genetic investigations . The analysis of a candidate gene in patients with undiagnosed PID was usually due to the recognition of evident similarities with disease features observed in mouse models, such as for the case of the beige (bg) which was found to be essentially identical to the mutant phenotype of Chediak-Higashi syndrome [5, 6]. Alternatively, a candidate gene was suspected on the basis of the correlation of a clinical phenotype and of its inheritance pattern with a signaling pathway. As shown in the case of T−/B+ SCID, mutations of genes encoding the common IL-2 Receptor gamma chain (IL2RG) and of the tyrosine kinase JAK3, two strictly related components of the same signaling pathway, result in the X-linked and in the autosomal recessive forms of SCID, respectively [7, 8].
Unbiased genetic approaches, such as linkage analysis, have been successfully used for the discovery of genetic causes of many immunodeficiencies, such as Wiskott–Aldrich syndrome . The study of Wiskott–Aldrich syndrome protein (WASP) have revealed the essential role of this cytoplasmic protein in the control of actin polimerization in hematopoietic. In addition, the study of WASP gene has shown that different types of mutations of the same gene can lead to broadly different clinical and immunological phenotypes including the classical disease characterized by congenital microthrombocytopenia, moderate to severe eczema, and recurrent or severe bacterial infections, the X-linked thrombocytopenia syndrome, or alternatively the X-linked neutropenia [10, 11].
Despite the unquestionable advances of researchers and clinicians in the last decades of investigation of primary immunodeficiencies, many clinical problems are still open. While an increasing number of patients with typical manifestations of PID are identified and appropriately treated, a definitive genetic or clinical diagnosis cannot be obtained in an significant fraction of patients . However, the development in the mid-2000s of high-throughput DNA sequencing technologies, known as next-generation sequencing (NGS) has revolutionized the genetic approach to PID by making it possible to simultaneously amplify and sequence millions of DNA fragments of a single subject within few days. NGS can be used for sequencing the whole-genome (WGS), or the exome, which is the sum of all exons. Although the exome sequencing covers only the exons and their adjacent nucleotides, approximately 85% of deleterious mutations are identified in these regions. However, identification of the pathogenic mutations can be very challenging; many nucleotide variants, that are detected by NGS, are difficult to interpret because they are related to poorly characterized genes or have an uncertain biological effect on protein structure/function. Nevertheless, whole-exome sequencing (WES) has been extensively used to identify novel genetic causes associated with immunological disorders, even when these diseases were extremely rare. There are numerous examples, such as the gene STAT1 associated to mucocutaneous candidiasis mutations or the gene PLDN that was found to be mutated in a rare form of partial albinism termed Hermansky–Pudlak syndrome type 9 [13, 14].
More recently, NGS has been successfully used for molecular diagnosis of Mendelian disorders in patients with neurological symptoms. In this context, genomic sequencing was shown to be able to reveal a genetic disease in 25% of the 250 unselected patients . While the classical genetic approach to patients with neurological diseases requires careful recognition of specific clinical, radiographic or histological features before proceeding to the sequence of a list of genes, the use of NGS as first step will probably increase the number of patients with a genetic diagnosis.
As an alternative to whole-exome sequencing, NGS analysis can be restricted to a list of genes associated with specific phenotypes. In a recent study, Nijman et al.  have performed parallel sequencing of 170 genes causing immunodeficiencies in 26 patients with undiagnosed disease despite routine immunological and genetic testing and identified four novel patients affected by PID. Hence, these studies suggest that exome sequencing, or alternatively targeted sequencing of PID-related genes, is candidate to be a primary tool for the study of patients with undiagnosed primary immunodeficiency (UPID) .
It is conceivable to speculate that when the current technical limitations of NGS will be solved, this technique will have increasing applications in the early identification and treatment of PID in patients presenting with a first episode of invasive infection. As proof of concept, 50 h differential diagnosis of genetic disorders by WGS has been proposed for the diagnosis of metabolic diseases in neonates staying at neonatal intensive care units . Likewise, NGS will be probably adopted in patients presenting with severe infections, possibly representing the first manifestation of an immunodeficiency. In these patients, early diagnosis of PID use will be instrumental to prevent the development of life-threatening infections and provide a rapid and effective treatment.