From 13698f718afd00126edcf3c0ba672fa2dbe8c94b Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 3 Apr 2019 16:53:11 -0500 Subject: Fixed an issue that caused global phenotype search to often not work and certain phenotype datasets to not show up in drop-downs --- wqflask/maintenance/gen_select_dataset.py | 3 +- wqflask/wqflask/gsearch.py | 8 +- .../new/javascript/dataset_menu_structure.json | 269 +++++++++++++-------- 3 files changed, 177 insertions(+), 103 deletions(-) diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py index 48849c8d..4d1b34a3 100644 --- a/wqflask/maintenance/gen_select_dataset.py +++ b/wqflask/maintenance/gen_select_dataset.py @@ -187,7 +187,6 @@ def get_datasets(types): for species, group_dict in types.iteritems(): datasets[species] = {} for group, type_list in group_dict.iteritems(): - #print("type_list: ", type_list) datasets[species][group] = {} for type_name in type_list: these_datasets = build_datasets(species, group, type_name[0]) @@ -209,7 +208,7 @@ def build_datasets(species, group, type_name): PublishFreeze.CreateTime asc""" % group) results = Cursor.fetchall() - if results != None: + if len(results) > 0: for result in results: print(result) dataset_id = str(result[0]) diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py index 2a643d19..56769112 100644 --- a/wqflask/wqflask/gsearch.py +++ b/wqflask/wqflask/gsearch.py @@ -139,13 +139,15 @@ class GSearch(object): this_trait['name'] = str(line[4]) this_trait['dataset'] = line[2] this_trait['dataset_fullname'] = line[3] - this_trait['hmac'] = user_manager.data_hmac('{}:{}'.format(line[5], line[3])) + this_trait['hmac'] = user_manager.data_hmac('{}:{}'.format(line[4], line[2])) this_trait['species'] = line[0] this_trait['group'] = line[1] - if line[9] != None: + if line[9] != None and line[6] != None: this_trait['description'] = line[6] - else: + elif line[5] != None: this_trait['description'] = line[5] + else: + this_trait['description'] = "N/A" this_trait['authors'] = line[7] this_trait['year'] = line[8] if this_trait['year'].isdigit(): diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json index 55858b5a..120174a1 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json +++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json @@ -116,15 +116,15 @@ "B30_K_1206_M", "Barley1 Leaf MAS 5.0 SCRI (Dec06)" ], - [ - "126", - "B30_K_1206_Rn", - "Barley1 Leaf gcRMAn SCRI (Dec06)" - ], [ "125", "B30_K_1206_R", "Barley1 Leaf gcRMA SCRI (Dec06)" + ], + [ + "126", + "B30_K_1206_Rn", + "Barley1 Leaf gcRMAn SCRI (Dec06)" ] ], "Phenotypes": [ @@ -1436,6 +1436,13 @@ "Human Orbital Prefrontal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" ] ], + "Phenotypes": [ + [ + "None", + "HSBPublish", + "HSB Phenotypes" + ] + ], "Posterior Inferior Parietal Cortex mRNA": [ [ "338", @@ -1493,8 +1500,23 @@ ] ] }, - "Islets-Gerling": {}, + "Islets-Gerling": { + "Phenotypes": [ + [ + "None", + "Islets-GerlingPublish", + "Islets-Gerling Phenotypes" + ] + ] + }, "TIGEM-Retina-RNA-Seq": { + "Phenotypes": [ + [ + "None", + "TIGEM-Retina-RNA-SeqPublish", + "TIGEM-Retina-RNA-Seq Phenotypes" + ] + ], "Retina mRNA": [ [ "802", @@ -1585,15 +1607,15 @@ "NCI_Agil_Mam_Tum_RMA_0409", "NCI Mammary LMT miRNA v2 (Apr09) RMA" ], - [ - "37", - "MA_M_0704_R", - "NCI Mammary mRNA M430 (July04) RMA" - ], [ "36", "MA_M_0704_M", "NCI Mammary mRNA M430 (July04) MAS5" + ], + [ + "37", + "MA_M_0704_R", + "NCI Mammary mRNA M430 (July04) RMA" ] ] }, @@ -1660,15 +1682,15 @@ ] ], "Liver mRNA": [ - [ - "39", - "LVF2_M_0704_R", - "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) RMA" - ], [ "38", "LVF2_M_0704_M", "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5" + ], + [ + "39", + "LVF2_M_0704_R", + "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) RMA" ] ], "Phenotypes": [ @@ -1679,14 +1701,17 @@ ] ] }, - "B6D2": {}, + "B6D2": { + "Phenotypes": [ + [ + "None", + "B6D2Publish", + "B6D2 Phenotypes" + ] + ] + }, "B6D2F2": { "Brain mRNA": [ - [ - "77", - "BRF2_M_0805_R", - "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) RMA" - ], [ "76", "BRF2_M_0805_M", @@ -1697,20 +1722,25 @@ "BRF2_M_0805_P", "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) PDNN" ], + [ + "77", + "BRF2_M_0805_R", + "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) RMA" + ], [ "33", "BRF2_M_0304_P", "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) PDNN" ], - [ - "32", - "BRF2_M_0304_R", - "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) RMA" - ], [ "31", "BRF2_M_0304_M", "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5" + ], + [ + "32", + "BRF2_M_0304_R", + "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) RMA" ] ], "Genotypes": [ @@ -1788,6 +1818,11 @@ ] ], "Striatum mRNA": [ + [ + "83", + "SA_M2_0905_M", + "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5" + ], [ "85", "SA_M2_0905_P", @@ -1797,11 +1832,6 @@ "84", "SA_M2_0905_R", "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA" - ], - [ - "83", - "SA_M2_0905_M", - "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5" ] ] }, @@ -1863,6 +1893,13 @@ "UCLA_BHF2_LIVER_0605", "UCLA BHF2 Liver (June05) mlratio" ] + ], + "Phenotypes": [ + [ + "None", + "BHF2Publish", + "BHF2 Phenotypes" + ] ] }, "BHHBF2": { @@ -2069,21 +2106,26 @@ "IBR_M_0606_R", "INIA Brain mRNA M430 (Jun06) RMA" ], - [ - "102", - "IBR_M_0106_R", - "INIA Brain mRNA M430 (Jan06) RMA" - ], [ "101", "IBR_M_0106_P", "INIA Brain mRNA M430 (Jan06) PDNN" ], + [ + "102", + "IBR_M_0106_R", + "INIA Brain mRNA M430 (Jan06) RMA" + ], [ "95", "BR_U_1105_P", "UTHSC Brain mRNA U74Av2 (Nov05) PDNN" ], + [ + "82", + "BR_U_0805_R", + "UTHSC Brain mRNA U74Av2 (Aug05) RMA" + ], [ "81", "BR_U_0805_P", @@ -2094,11 +2136,6 @@ "BR_U_0805_M", "UTHSC Brain mRNA U74Av2 (Aug05) MAS5" ], - [ - "82", - "BR_U_0805_R", - "UTHSC Brain mRNA U74Av2 (Aug05) RMA" - ], [ "42", "CB_M_0204_P", @@ -2195,11 +2232,6 @@ "Eye_M2_0908_R_ND", "Eye M430v2 WT Gpnmb (Sep08) RMA" ], - [ - "279", - "Eye_M2_0908_R_WT", - "Eye M430v2 WT Tyrp1 (Sep08) RMA" - ], [ "278", "Eye_M2_0908_R_MT", @@ -2210,6 +2242,11 @@ "Eye_M2_0908_WTWT", "Eye M430v2 WT WT (Sep08) RMA" ], + [ + "279", + "Eye_M2_0908_R_WT", + "Eye M430v2 WT Tyrp1 (Sep08) RMA" + ], [ "400", "DBA2J-ONH-1212", @@ -2493,16 +2530,16 @@ ] ], "Kidney mRNA": [ - [ - "239", - "MA_M2F_0706_R", - "Mouse kidney M430v2 Female (Aug06) RMA" - ], [ "240", "MA_M2M_0706_R", "Mouse kidney M430v2 Male (Aug06) RMA" ], + [ + "239", + "MA_M2F_0706_R", + "Mouse kidney M430v2 Female (Aug06) RMA" + ], [ "118", "MA_M2_0806_R", @@ -2513,23 +2550,18 @@ "MA_M2_0806_P", "Mouse Kidney M430v2 Sex Balanced (Aug06) PDNN" ], - [ - "116", - "MA_M2_0706_P", - "Mouse Kidney M430v2 (Jul06) PDNN" - ], [ "115", "MA_M2_0706_R", "Mouse Kidney M430v2 (Jul06) RMA" + ], + [ + "116", + "MA_M2_0706_P", + "Mouse Kidney M430v2 (Jul06) PDNN" ] ], "Liver Metabolome": [ - [ - "836", - "UTHSC-ETHZ-EPFL_LivPMetExtAHFD0817", - "UTHSC/ETHZ/EPFL BXD Liver Polar Metabolites Extraction A, HFD Cohorts (Mar 2017) log2" - ], [ "838", "UTHSC-ETHZ-EPFL_LivPMetExtBHFD0817", @@ -2545,6 +2577,11 @@ "UTHSC-ETHZ-EPFL_LivPMetExtBCD0817", "UTHSC/ETHZ/EPFL BXD Liver Polar Metabolites Extraction B, Chow Diet Cohorts (Mar 2017) log2" ], + [ + "836", + "UTHSC-ETHZ-EPFL_LivPMetExtAHFD0817", + "UTHSC/ETHZ/EPFL BXD Liver Polar Metabolites Extraction A, HFD Cohorts (Mar 2017) log2" + ], [ "473", "EPFL-LISP_LivPMetCDHFD1213", @@ -2654,6 +2691,11 @@ "EPFLMouseLiverHFDRMA0413", "EPFL/LISP BXD HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA" ], + [ + "849", + "EPFLMouseLiverCDEx0413", + "EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level" + ], [ "848", "EPFLMouseLiverHFCEx0413", @@ -2664,11 +2706,6 @@ "EPFLMouseLiverCDRMA0413", "EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA" ], - [ - "849", - "EPFLMouseLiverCDEx0413", - "EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level" - ], [ "433", "EPFLMouseLiverBothExRMA0413", @@ -2797,16 +2834,16 @@ ] ], "Neocortex mRNA": [ - [ - "375", - "DevNeocortex_ILM6.2P14RInv_1111", - "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov11) RankInv" - ], [ "374", "DevNeocortex_ILM6.2P3RInv_1111", "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv" ], + [ + "375", + "DevNeocortex_ILM6.2P14RInv_1111", + "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov11) RankInv" + ], [ "284", "HQFNeoc_1210v2_RankInv", @@ -3062,6 +3099,11 @@ ] ], "Ventral Tegmental Area mRNA": [ + [ + "228", + "VCUSal_0609_R", + "VCU BXD VTA Sal M430 2.0 (Jun09) RMA" + ], [ "230", "VCUEtvsSal_0609_R", @@ -3071,11 +3113,6 @@ "229", "VCUEtOH_0609_R", "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA" - ], - [ - "228", - "VCUSal_0609_R", - "VCU BXD VTA Sal M430 2.0 (Jun09) RMA" ] ] }, @@ -3135,6 +3172,13 @@ "LV_G_0106_F", "UNC Agilent G4121A Liver LOWESS Stanford (Jan06) Females" ] + ], + "Phenotypes": [ + [ + "None", + "BXD300Publish", + "BXD300 Phenotypes" + ] ] }, "BXH": { @@ -3262,6 +3306,13 @@ "INIA_LCMB_1215", "INIA LCM (11 Regions) BASELINE RNA-seq Transcript Level (Dec15)" ] + ], + "Phenotypes": [ + [ + "None", + "CIE-INIAPublish", + "CIE-INIA Phenotypes" + ] ] }, "CIE-RMA": { @@ -3283,9 +3334,24 @@ "INIA_UTHSC_Mid_AffyMTA1_Ex_May17", "INIA-UTHSC Midbrain CIE Affy MTA 1.0 Exon Level (Apr17) RMA" ] + ], + "Phenotypes": [ + [ + "None", + "CIE-RMAPublish", + "CIE-RMA Phenotypes" + ] + ] + }, + "CMS": { + "Phenotypes": [ + [ + "None", + "CMSPublish", + "CMS Phenotypes" + ] ] }, - "CMS": {}, "CTB6F2": { "Adipose mRNA": [ [ @@ -3386,15 +3452,15 @@ ] ], "Hippocampus mRNA": [ - [ - "100", - "HC_M2CB_1205_R", - "Hippocampus Consortium M430v2 CXB (Dec05) RMA" - ], [ "99", "HC_M2CB_1205_P", "Hippocampus Consortium M430v2 CXB (Dec05) PDNN" + ], + [ + "100", + "HC_M2CB_1205_R", + "Hippocampus Consortium M430v2 CXB (Dec05) RMA" ] ], "Liver mRNA": [ @@ -3484,16 +3550,6 @@ ] ], "Hippocampus mRNA": [ - [ - "213", - "Illum_LXS_Hipp_NOS_1008", - "Hippocampus Illumina NOS (Oct08) RankInv beta" - ], - [ - "219", - "Illum_LXS_Hipp_NON_1008", - "Hippocampus Illumina NON (Oct08) RankInv beta" - ], [ "212", "Illum_LXS_Hipp_RSE_1008", @@ -3509,6 +3565,16 @@ "Illum_LXS_Hipp_RSS_1008", "Hippocampus Illumina RSS (Oct08) RankInv beta" ], + [ + "213", + "Illum_LXS_Hipp_NOS_1008", + "Hippocampus Illumina NOS (Oct08) RankInv beta" + ], + [ + "219", + "Illum_LXS_Hipp_NON_1008", + "Hippocampus Illumina NON (Oct08) RankInv beta" + ], [ "143", "Illum_LXS_Hipp_loess0807", @@ -3599,15 +3665,15 @@ ] ], "Hippocampus mRNA": [ - [ - "273", - "UMUTAffyExon_0209_RMA_MDP", - "UMUTAffy Hippocampus Exon (Feb09) RMA MDP" - ], [ "272", "HC_M2_0606_MDP", "Hippocampus Consortium M430v2 (Jun06) RMA MDP" + ], + [ + "273", + "UMUTAffyExon_0209_RMA_MDP", + "UMUTAffy Hippocampus Exon (Feb09) RMA MDP" ] ], "Liver mRNA": [ @@ -3669,6 +3735,13 @@ ] }, "Retina-RGC-Rheaume": { + "Phenotypes": [ + [ + "None", + "Retina-RGC-RheaumePublish", + "Retina-RGC-Rheaume Phenotypes" + ] + ], "Retina Single-cell RNA-Seq": [ [ "865", -- cgit v1.2.3