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

Allow search by external id for patients #285

Open pontikos opened 3 years ago

pontikos commented 3 years ago

I would like to be able to search by external_id , for example: AliceDavidson_May2016_otogen_272RO

alanwilter commented 3 years ago

@pontikos When searching for a sample, assuming in "Search Phenopolis" page and with autocomplete, what to you expect to get once clicking in the answer? in ou DB we have:

select * from individuals i2 ;
external_id internal_id sex observed_features unobserved_features genes ethnicity consanguinity pi observed_features_names simplified_observed_features simplified_observed_features_names ancestor_observed_features ancestor_observed_features_names
WebsterURMD_Sample_IC16489 PH00008258 M HP:0000007,HP:0000479,HP:0000505,HP:0007754 HP:0000316,HP:0000356,HP:0000359,HP:0000384,HP:0000405,HP:0000407,HP:0000481,HP:0000568,HP:0000587,HP:0000589,HP:0000593,HP:0000601,HP:0000953,HP:0001010,HP:0004467,HP:0005306,HP:0011276 TTLL5 Unknown Autosomal recessive inheritance;Abnormal retinal morphology;Visual impairment;Macular dystrophy HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001,HP:0000005,HP:0000007,HP:0000118,HP:0000478,HP:0000479,HP:0000504,HP:0000505,HP:0000556,HP:0001098,HP:0001103,HP:0004329,HP:0007754,HP:0012372,HP:0012373 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology
WebsterURMD_Sample_SK13768 PH00008268 F HP:0000007,HP:0000479,HP:0000505,HP:0007754 HP:0000316,HP:0000356,HP:0000359,HP:0000384,HP:0000405,HP:0000407,HP:0000481,HP:0000568,HP:0000587,HP:0000589,HP:0000593,HP:0000601,HP:0000953,HP:0001010,HP:0004467,HP:0005306,HP:0011276 DRAM2 Unknown Autosomal recessive inheritance;Abnormal retinal morphology;Visual impairment;Macular dystrophy HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001,HP:0000005,HP:0000007,HP:0000118,HP:0000478,HP:0000479,HP:0000504,HP:0000505,HP:0000556,HP:0001098,HP:0001103,HP:0004329,HP:0007754,HP:0012372,HP:0012373 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology
WebsterURMD_Sample_GV4344 PH00008256 M HP:0000007,HP:0000505,HP:0007754 DRAM2 unknown HP:0000007,HP:0000505,HP:0007754 HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001;HP:0000005;HP:0000007;HP:0000118;HP:0000478;HP:0000479;HP:0000504;HP:0000505;HP:0000556;HP:0001098;HP:0001103;HP:0004329;HP:0007754;HP:0012372;HP:0012373 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology
for_test_Sample PH00000000 F HP:0000000 HP:9999999 Unknown just test HP:9999999 just test HP:0000000 just test
WebsterURMD_Sample_SJ17898 PH00008267 M HP:0000002,HP:0000003,HP:0000005 HP:0000316,HP:0000356,HP:0000359,HP:0000384,HP:0000405,HP:0000407,HP:0000481,HP:0000568,HP:0000587,HP:0000589,HP:0000593,HP:0000601,HP:0000953,HP:0001010,HP:0004467,HP:0005306,HP:0011276 Abnormality of body height;Multicystic kidney dysplasia;Mode of inheritance HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001;HP:0000002;HP:0000003;HP:0000005;HP:0000077;HP:0000079;HP:0000107;HP:0000118;HP:0000119;HP:0001507;HP:0010935;HP:0012210 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology
pontikos commented 3 years ago

Sorry Alan, I don't understand the question. I am expecting to be directed to the individual page.

On Wed, 25 Nov 2020 at 11:33, Alan notifications@github.com wrote:

@pontikos https://github.com/pontikos When searching for a sample, assuming in "Search Phenopolis" page and with autocomplete, what to you expect to get once clicking in the answer? in ou DB we have:

select * from individuals i2 ;

external_id internal_id sex observed_features unobserved_features genes ethnicity consanguinity pi observed_features_names simplified_observed_features simplified_observed_features_names ancestor_observed_features ancestor_observed_features_names WebsterURMD_Sample_IC16489 PH00008258 M HP:0000007,HP:0000479,HP:0000505,HP:0007754 HP:0000316,HP:0000356,HP:0000359,HP:0000384,HP:0000405,HP:0000407,HP:0000481,HP:0000568,HP:0000587,HP:0000589,HP:0000593,HP:0000601,HP:0000953,HP:0001010,HP:0004467,HP:0005306,HP:0011276 TTLL5 Unknown Autosomal recessive inheritance;Abnormal retinal morphology;Visual impairment;Macular dystrophy HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001,HP:0000005,HP:0000007,HP:0000118,HP:0000478,HP:0000479,HP:0000504,HP:0000505,HP:0000556,HP:0001098,HP:0001103,HP:0004329,HP:0007754,HP:0012372,HP:0012373 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology WebsterURMD_Sample_SK13768 PH00008268 F HP:0000007,HP:0000479,HP:0000505,HP:0007754 HP:0000316,HP:0000356,HP:0000359,HP:0000384,HP:0000405,HP:0000407,HP:0000481,HP:0000568,HP:0000587,HP:0000589,HP:0000593,HP:0000601,HP:0000953,HP:0001010,HP:0004467,HP:0005306,HP:0011276 DRAM2 Unknown Autosomal recessive inheritance;Abnormal retinal morphology;Visual impairment;Macular dystrophy HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001,HP:0000005,HP:0000007,HP:0000118,HP:0000478,HP:0000479,HP:0000504,HP:0000505,HP:0000556,HP:0001098,HP:0001103,HP:0004329,HP:0007754,HP:0012372,HP:0012373 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology WebsterURMD_Sample_GV4344 PH00008256 M HP:0000007,HP:0000505,HP:0007754 DRAM2 unknown HP:0000007,HP:0000505,HP:0007754 HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001;HP:0000005;HP:0000007;HP:0000118;HP:0000478;HP:0000479;HP:0000504;HP:0000505;HP:0000556;HP:0001098;HP:0001103;HP:0004329;HP:0007754;HP:0012372;HP:0012373 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology for_test_Sample PH00000000 F HP:0000000 HP:9999999 Unknown just test HP:9999999 just test HP:0000000 just test WebsterURMD_Sample_SJ17898 PH00008267 M HP:0000002,HP:0000003,HP:0000005 HP:0000316,HP:0000356,HP:0000359,HP:0000384,HP:0000405,HP:0000407,HP:0000481,HP:0000568,HP:0000587,HP:0000589,HP:0000593,HP:0000601,HP:0000953,HP:0001010,HP:0004467,HP:0005306,HP:0011276 Abnormality of body height;Multicystic kidney dysplasia;Mode of inheritance HP:0000007,HP:0000505,HP:0007754 Autosomal recessive inheritance;Visual impairment;Macular dystrophy HP:0000001;HP:0000002;HP:0000003;HP:0000005;HP:0000077;HP:0000079;HP:0000107;HP:0000118;HP:0000119;HP:0001507;HP:0010935;HP:0012210 All;Mode of inheritance;Autosomal recessive inheritance;Phenotypic abnormality;Abnormality of the eye;Abnormal retinal morphology;Abnormality of vision;Visual impairment;Retinal dystrophy;Abnormal fundus morphology;Abnormal macular morphology;Abnormal morphology of the posterior segment of the globe;Macular dystrophy;Abnormal eye morphology;Abnormal eye physiology

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/phenopolis/phenopolis_browser/issues/285#issuecomment-733652436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5MN5D4DSEFIVLZRAC5NUDSRTTSHANCNFSM4T6Q3IMA .

alanwilter commented 3 years ago

Sorry me, I thought it was one-to-many, but it's one-to-one, so yes, it makes perfect sense what you suggest.

alanwilter commented 3 years ago

@pontikos Suppose you want WebsterURMD_Sample_IC16489 and then you start typing in Search field Web... what do you want to see in the return field?: a) the sample names that start with Web; or b) actually the PH000... that may be linked to the sample; or c) a combination of both like WebsterURMD_Sample_IC16489:PH00008258? For sure this search will be limited to only the patients the user can see (like when searching for PH000...). I'm inclined to go with c)

pontikos commented 3 years ago

I think it would make more sense to see the sample names that start with Web i.e (a).

pontikos commented 3 years ago

@alanwilter any updates on this?

alanwilter commented 3 years ago

To be dealt while refactoring autocomplete.py for the new schema.