Rare diseases are often hard and long to be diagnosed precisely, and most of them lack approved treatment. For some complex rare diseases, precision medicine approach is further required to stratify patients into homogeneous subgroups based on the clinical, biological or molecular features. In such situation, deep phenotyping of these patients and comparing their profiles based on subjacent similarities are thus essential to help fast and precise diagnoses and better understanding of pathophysiological processes in order to develop therapeutic solutions. In this article, we developed a new pipeline of using deep phenotyping to define patient similarity and applied it to ciliopathies, a group of rare and severe diseases caused by ciliary dysfunction. As a French national reference center for rare and undiagnosed diseases, the Necker-Enfants Malades Hospital (Necker Children's Hospital) hosts the Imagine Institute, a research institute focusing on genetic diseases. The clinical data warehouse contains on one hand EHR data, and on the other hand, clinical research data. The similarity metrics were computed on both data sources, and were evaluated with two tasks: diagnoses with EHRs and subtyping with ciliopathy specific research data. We obtained a precision of 0.767 in the top 30 most similar patients with diagnosed ciliopathies. Subtyping ciliopathy patients with phenotypic similarity showed concordances with expert knowledge. Similarity metrics applied to rare disease offer new perspectives in a translational context that may help to recruit patients for research, reduce the length of the diagnostic journey, and better understand the mechanisms of the disease.