isabelrem / 2023-Software-Development-Assessment

MIT License
2 stars 1 forks source link

64 modify sql functions so app will continue to run even if database cannot be found #65

Closed isabelrem closed 8 months ago

gitguardian[bot] commented 8 months ago

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them. Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately. Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

jess789550 commented 8 months ago

Enter 1 to search for new panel information. Enter 2 to browse existing PanelSearch records. 1 If you would like to search by R-code, enter 1. If you would like to enter a disease description, enter 2. 1 Enter your search term: (e.g., R128 or pneumothorax) R128 Which genome build would you like to use? Enter 1 for GRCh37. Enter 2 for GRCh38. 2 GRch38 build selected. Panel ID: 13 Panel Name: Brugada syndrome and cardiac sodium channel disease GMS Sign-off Status: Signed Off Associated NGTD R-codes: R128 Gene Number: 23 Gene List: HGNC_ID Symbol Coords Mane_Select_Transcript HGNC:10593 SCN5A 3:38548057-38649673 NM_000335.5 HGNC:6251 KCNH2 7:150944961-150978315 NM_000238.4 HGNC:60 ABCC9 12:21797401-21942529 NM_020297.4 HGNC:493 ANK2 4:112818109-113383740 NM_001148.6 HGNC:1390 CACNA1C 12:1970786-2697950 NM_000719.7 HGNC:1399 CACNA2D1 7:81946444-82443798 NM_000722.4 HGNC:1402 CACNB2 10:18140677-18541869 NM_201596.3 HGNC:1529 CAV3 3:8733800-8841808 NM_033337.3 HGNC:2900 DLG1 3:197042560-197299300 NM_001366207.1 HGNC:28956 GPD1L 3:32105689-32168713 NM_015141.4 HGNC:16882 HCN4 15:73319859-73369264 NM_005477.3 HGNC:6239 KCND3 1:111770662-111989155 NM_001378969.1 HGNC:6243 KCNE3 11:74454841-74467729 NM_005472.5 HGNC:6241 KCNE5 X:109623700-109625172 NM_012282.4 HGNC:6269 KCNJ8 12:21764955-21775581 NM_004982.4 HGNC:9024 PKP2 12:32790745-32896840 NM_001005242.3 HGNC:17679 RANGRF 17:8288497-8290092 NM_016492.5 HGNC:10582 SCN10A 3:38696802-38794010 NM_006514.4 HGNC:10586 SCN1B 19:35030466-35040449 NM_001037.5 HGNC:10589 SCN2B 11:118161951-118176673 NM_004588.5 HGNC:20665 SCN3B 11:123629187-123655244 NM_001040151.2 HGNC:16643 SLMAP 3:57755450-57929168 NM_001377540.1 HGNC:17993 TRPM4 19:49157741-49211836 NM_017636.4 Generate BED file? (Y/N) N Would you like to save this search against a patient ID? (Y/N) Y What patient ID would you like to save this search against? rdhgfhgj Brugada syndrome and cardiac sodium channel disease GRch38 GRch38 build selected. Panel ID: 13 Panel Name: Brugada syndrome and cardiac sodium channel disease GMS Sign-off Status: Signed Off Associated NGTD R-codes: R128 Gene Number: 23 Gene List: HGNC_ID Symbol Coords Mane_Select_Transcript HGNC:10593 SCN5A 3:38548057-38649673 NM_000335.5 HGNC:6251 KCNH2 7:150944961-150978315 NM_000238.4 HGNC:60 ABCC9 12:21797401-21942529 NM_020297.4 HGNC:493 ANK2 4:112818109-113383740 NM_001148.6 HGNC:1390 CACNA1C 12:1970786-2697950 NM_000719.7 HGNC:1399 CACNA2D1 7:81946444-82443798 NM_000722.4 HGNC:1402 CACNB2 10:18140677-18541869 NM_201596.3 HGNC:1529 CAV3 3:8733800-8841808 NM_033337.3 HGNC:2900 DLG1 3:197042560-197299300 NM_001366207.1 HGNC:28956 GPD1L 3:32105689-32168713 NM_015141.4 HGNC:16882 HCN4 15:73319859-73369264 NM_005477.3 HGNC:6239 KCND3 1:111770662-111989155 NM_001378969.1 HGNC:6243 KCNE3 11:74454841-74467729 NM_005472.5 HGNC:6241 KCNE5 X:109623700-109625172 NM_012282.4 HGNC:6269 KCNJ8 12:21764955-21775581 NM_004982.4 HGNC:9024 PKP2 12:32790745-32896840 NM_001005242.3 HGNC:17679 RANGRF 17:8288497-8290092 NM_016492.5 HGNC:10582 SCN10A 3:38696802-38794010 NM_006514.4 HGNC:10586 SCN1B 19:35030466-35040449 NM_001037.5 HGNC:10589 SCN2B 11:118161951-118176673 NM_004588.5 HGNC:20665 SCN3B 11:123629187-123655244 NM_001040151.2 HGNC:16643 SLMAP 3:57755450-57929168 NM_001377540.1 HGNC:17993 TRPM4 19:49157741-49211836 NM_017636.4 Unfortunately the SQL database cannot be accessed at this time. Your search was not saved. Thank you for using PanelSearch. Goodbye.

jess789550 commented 8 months ago

Enter 1 to search for new panel information. Enter 2 to browse existing PanelSearch records. 2 Please enter the patient ID here. If you wish to see all saved records, press Return/Enter: successful connection to sql database

Patients table

id patient_id search_id 0 1 Bucket 1 1 2 grdfcv 2

Searches table

id panel_id panel_name panel_version ... r_code transcript genome_build bed_file 0 1 1331 Factor XI deficiency 1.1 ... R120 a really good one GRch37 transcript start end label score ... 1 2 13 Brugada syndrome and cardiac sodium channel di... 3.6 ... R128 a really good one GRch37 placeholder

[2 rows x 10 columns] Would you like to save these tables locally? (Y/N) N Thank you for using PanelSearch. Goodbye.

jess789550 commented 8 months ago

Works well - just need to change "transcript" in SQL db parsing

jess789550 commented 8 months ago

Also could we update docs to include SQL database examples please? Thanks :)