phenopolis / phenopolis_genomics_browser

Python API and React frontend for the Phenopolis Genomics Browser
https://dev-live.phenopolis.org
MIT License
31 stars 2 forks source link

Enable search of HPOs by synonyms and description #108

Open priesgo opened 4 years ago

pontikos commented 3 years ago

Query needs to be implement for new db.

alanwilter commented 3 years ago

To be done with the new schema. Things to consider:

  1. table hpo.synonym: search for synonyms in synonyms' column description;
  2. table hpo.term: search in column description, but search in comment column as well?
  3. table hpo.alt: search for alternative hpo_id?
  4. what about table hpo.xref?

An example:

select a.alt_id, s.description, t.id, t.hpo_id, t."name", t.description, t."comment" from hpo.term t
join hpo.alt a on a.term_id = t.id
join hpo.synonym s on s.term_id = t.id
where a.term_id = 3
alt_id description id hpo_id name description comment
HP:0004715 Multicystic dysplastic kidney 3 HP:0000003 Multicystic kidney dysplasia Multicystic dysplasia of the kidney is characterized by multiple cysts of varying size in the kidney and the absence of a normal pelvicaliceal system. The condition is associated with ureteral or ureteropelvic atresia, and the affected kidney is nonfunctional. Multicystic kidney dysplasia is the result of abnormal fetal renal development in which the affected kidney is replaced by multiple cysts and has little or no residual function. The vast majority of multicystic kidneys are unilateral. Multicystic kidney can be diagnosed on prenatal ultrasound.
HP:0004715 Multicystic kidneys 3 HP:0000003 Multicystic kidney dysplasia Multicystic dysplasia of the kidney is characterized by multiple cysts of varying size in the kidney and the absence of a normal pelvicaliceal system. The condition is associated with ureteral or ureteropelvic atresia, and the affected kidney is nonfunctional. Multicystic kidney dysplasia is the result of abnormal fetal renal development in which the affected kidney is replaced by multiple cysts and has little or no residual function. The vast majority of multicystic kidneys are unilateral. Multicystic kidney can be diagnosed on prenatal ultrasound.
HP:0004715 Multicystic renal dysplasia 3 HP:0000003 Multicystic kidney dysplasia Multicystic dysplasia of the kidney is characterized by multiple cysts of varying size in the kidney and the absence of a normal pelvicaliceal system. The condition is associated with ureteral or ureteropelvic atresia, and the affected kidney is nonfunctional. Multicystic kidney dysplasia is the result of abnormal fetal renal development in which the affected kidney is replaced by multiple cysts and has little or no residual function. The vast majority of multicystic kidneys are unilateral. Multicystic kidney can be diagnosed on prenatal ultrasound.