aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2019-04-04 10:39:31 -0500
committerzsloan2019-04-04 10:39:31 -0500
commit91147b36c65e742d9b7f2fda95fb5969e25f6e34 (patch)
treea00f96c8b8e698918ed1caca295bc5172e80d5d4 /wqflask
parent13698f718afd00126edcf3c0ba672fa2dbe8c94b (diff)
downloadgenenetwork2-91147b36c65e742d9b7f2fda95fb5969e25f6e34.tar.gz
Fixed issue where dataset_menu_structure.json included some groups with no visible datasets
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/maintenance/gen_select_dataset.py17
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_menu_structure.json524
2 files changed, 25 insertions, 516 deletions
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index 4d1b34a3..c590a185 100644
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -120,10 +120,19 @@ def get_types(groups):
else:
types[species][group_name] = [("Genotypes", "Genotypes")]
if group_name in types[species]:
- types[species][group_name] += build_types(species, group_name)
- else:
- types[species][group_name] = build_types(species, group_name)
-
+ types_list = build_types(species, group_name)
+ if len(types_list) > 0:
+ types[species][group_name] += types_list
+ else:
+ types[species].pop(group_name, None)
+ groups[species] = tuple(group for group in groups[species] if group[0] != group_name)
+ else: #ZS: This whole else statement might be unnecessary, need to check
+ types_list = build_types(species, group_name)
+ if len(types_list) > 0:
+ types[species][group_name] = types_list
+ else:
+ types[species].pop(group_name, None)
+ groups[species] = tuple(group for group in groups[species] if group[0] != group_name)
return types
diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
index 120174a1..ad9e80ab 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
+++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
@@ -10,56 +10,7 @@
]
}
},
- "arabidopsis": {
- "BayXSha": {
- "Genotypes": [
- [
- "None",
- "BayXShaGeno",
- "BayXSha Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "642",
- "BayXShaPublish",
- "BayXSha Published Phenotypes"
- ]
- ]
- },
- "ColXBur": {
- "Genotypes": [
- [
- "None",
- "ColXBurGeno",
- "ColXBur Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "623",
- "ColXBurPublish",
- "ColXBur Published Phenotypes"
- ]
- ]
- },
- "ColXCvi": {
- "Genotypes": [
- [
- "None",
- "ColXCviGeno",
- "ColXCvi Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "640",
- "ColXCviPublish",
- "ColXCvi Published Phenotypes"
- ]
- ]
- }
- },
+ "arabidopsis": {},
"barley": {
"QSM": {
"Leaf mRNA": [
@@ -1330,15 +1281,6 @@
]
]
},
- "HCP": {
- "Phenotypes": [
- [
- "None",
- "HCPPublish",
- "HCP Private Phenotypes"
- ]
- ]
- },
"HLC": {
"Liver mRNA": [
[
@@ -1500,15 +1442,6 @@
]
]
},
- "Islets-Gerling": {
- "Phenotypes": [
- [
- "None",
- "Islets-GerlingPublish",
- "Islets-Gerling Phenotypes"
- ]
- ]
- },
"TIGEM-Retina-RNA-Seq": {
"Phenotypes": [
[
@@ -1557,42 +1490,6 @@
]
]
},
- "AIL-LGSM-F34-A": {
- "Phenotypes": [
- [
- "655",
- "AIL-LGSM-F34-APublish",
- "AIL F34-A Phenotypes"
- ]
- ]
- },
- "AIL-LGSM-F34-F39-43-GBS": {
- "Phenotypes": [
- [
- "654",
- "AIL-LGSM-F34-F39-43-GBSPublish",
- "AIL F34-F39-43-GBS Phenotypes"
- ]
- ]
- },
- "AIL-LGSM-F34-GBS": {
- "Phenotypes": [
- [
- "656",
- "AIL-LGSM-F34-GBSPublish",
- "AIL F34-GBS Phenotypes"
- ]
- ]
- },
- "AIL-LGSM-F39-43-GBS": {
- "Phenotypes": [
- [
- "657",
- "AIL-LGSM-F39-43-GBSPublish",
- "AIL F39-43-GBS Phenotypes"
- ]
- ]
- },
"AKXD": {
"Genotypes": [
[
@@ -1701,15 +1598,6 @@
]
]
},
- "B6D2": {
- "Phenotypes": [
- [
- "None",
- "B6D2Publish",
- "B6D2 Phenotypes"
- ]
- ]
- },
"B6D2F2": {
"Brain mRNA": [
[
@@ -1751,22 +1639,6 @@
]
]
},
- "B6D2F2-PSU": {
- "Genotypes": [
- [
- "617",
- "B6D2F2-PSUGeno",
- "B6D2F2-PSU Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "None",
- "B6D2F2-PSUPublish",
- "B6D2F2 PSU Phenotypes"
- ]
- ]
- },
"B6D2RI": {
"Hippocampus mRNA": [
[
@@ -3116,15 +2988,6 @@
]
]
},
- "BXD-Bone": {
- "Phenotypes": [
- [
- "650",
- "BXD-BonePublish",
- "BXD-Bone Phenotypes"
- ]
- ]
- },
"BXD-Harvested": {
"Hippocampus mRNA": [
[
@@ -3228,22 +3091,6 @@
]
]
},
- "C57BL-6JxC57BL-6NJF2": {
- "Genotypes": [
- [
- "622",
- "C57BL-6JxC57BL-6NJF2Geno",
- "C57BL-6JxC57BL-6NJF2 Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "620",
- "C57BL-6JxC57BL-6NJF2Publish",
- "C57BL/6JxC57BL/6NJ F2 CROSS Phenotypes"
- ]
- ]
- },
"CFW": {
"Hippocampus mRNA": [
[
@@ -3343,15 +3190,6 @@
]
]
},
- "CMS": {
- "Phenotypes": [
- [
- "None",
- "CMSPublish",
- "CMS Phenotypes"
- ]
- ]
- },
"CTB6F2": {
"Adipose mRNA": [
[
@@ -3501,7 +3339,6 @@
]
]
},
- "EMSR": {},
"HS": {
"Hippocampus mRNA": [
[
@@ -3626,22 +3463,6 @@
]
]
},
- "Linsenbardt-Boehm": {
- "Genotypes": [
- [
- "None",
- "Linsenbardt-BoehmGeno",
- "Linsenbardt-Boehm Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "645",
- "Linsenbardt-BoehmPublish",
- "Linsenbardt-Boehm Published Phenotypes"
- ]
- ]
- },
"MDP": {
"Bone Femur mRNA": [
[
@@ -3759,29 +3580,9 @@
"UConn-Rheaume Retina RGC (Sep18) scRNA-Seq Siamak"
]
]
- },
- "SOTNOT-OHSU": {
- "Genotypes": [
- [
- "613",
- "SOTNOT-OHSUGeno",
- "SOTNOT-OHSU Genotypes"
- ]
- ]
- },
- "Scripps-2013": {}
- },
- "poplar": {
- "Poplar": {
- "Phenotypes": [
- [
- "649",
- "PoplarPublish",
- "Poplar Phenotypes"
- ]
- ]
}
},
+ "poplar": {},
"rat": {
"HSNIH-Palmer": {
"Infralimbic Cortex mRNA": [
@@ -3827,15 +3628,6 @@
]
]
},
- "HSNIH-RGSMC": {
- "Phenotypes": [
- [
- "None",
- "HSNIH-RGSMCPublish",
- "HSNIH Published Phenotypes"
- ]
- ]
- },
"HXBBXH": {
"Adipose mRNA": [
[
@@ -3926,44 +3718,8 @@
]
}
},
- "soybean": {
- "J12XJ58F11": {
- "Genotypes": [
- [
- "None",
- "J12XJ58F11Geno",
- "J12XJ58F11 Genotypes"
- ]
- ],
- "Phenotypes": [
- [
- "647",
- "J12XJ58F11Publish",
- "J12XJ58F11 Phenotypes"
- ]
- ]
- },
- "J12XJ58F2": {
- "Phenotypes": [
- [
- "616",
- "J12XJ58F2Publish",
- "J12XJ58F2 Published Phenotypes"
- ]
- ]
- }
- },
- "tomato": {
- "LXP": {
- "Phenotypes": [
- [
- "621",
- "LXPPublish",
- "LXP Published Phenotypes"
- ]
- ]
- }
- }
+ "soybean": {},
+ "tomato": {}
},
"groups": {
"All Species": [
@@ -3972,20 +3728,7 @@
"All Groups"
]
],
- "arabidopsis": [
- [
- "BayXSha",
- "BayXSha"
- ],
- [
- "ColXBur",
- "ColXBur"
- ],
- [
- "ColXCvi",
- "ColXCvi"
- ]
- ],
+ "arabidopsis": [],
"barley": [
[
"QSM",
@@ -4024,10 +3767,6 @@
"Brain, Aging: Normal Gene Expression (UCI/Cotman)"
],
[
- "HCP",
- "Brain, Cognition, Human Connectome Project"
- ],
- [
"HSB",
"Brain, Development: Normal Gene Expression (Yale/Sestan)"
],
@@ -4060,10 +3799,6 @@
"Lymphoblastoid Cells: Gene Expression (CEPH, Williams)"
],
[
- "Islets-Gerling",
- "Pancreatic: Islets (UTHSC/Gerling)"
- ],
- [
"TIGEM-Retina-RNA-Seq",
"Retina: Normal Adult Gene Expression, RNA-Seq (TIGEM)"
]
@@ -4074,22 +3809,6 @@
"AIL Advanced Intercross Line"
],
[
- "AIL-LGSM-F34-A",
- "AIL LGSM F34 (Array)"
- ],
- [
- "AIL-LGSM-F34-GBS",
- "AIL LGSM F34 (GBS)"
- ],
- [
- "AIL-LGSM-F34-F39-43-GBS",
- "AIL LGSM F34 and F39-43 (GBS)"
- ],
- [
- "AIL-LGSM-F39-43-GBS",
- "AIL LGSM F39-43 (GBS)"
- ],
- [
"AKXD",
"AKXD RI Family"
],
@@ -4102,18 +3821,10 @@
"B6BTBRF2"
],
[
- "Linsenbardt-Boehm",
- "B6D2 EtOH Selected Advanced Intercross"
- ],
- [
"B6D2F2",
"B6D2F2"
],
[
- "B6D2F2-PSU",
- "B6D2F2 PSU"
- ],
- [
"BDF2-1999",
"BDF2 UCLA"
],
@@ -4134,10 +3845,6 @@
"BXD Aged"
],
[
- "BXD-Bone",
- "BXD Bone Individual Data"
- ],
- [
"BXD-Harvested",
"BXD NIA Longevity Study"
],
@@ -4170,10 +3877,6 @@
"Chronic Intermittent Ethanol Phase 2"
],
[
- "CMS",
- "Chronic Mild Stress"
- ],
- [
"CXB",
"CXB RI Family (strain means)"
],
@@ -4182,14 +3885,6 @@
"D2 Glaucoma Model"
],
[
- "EMSR",
- "Ethanol-Medicated Stress Reduction"
- ],
- [
- "B6D2",
- "Glaucoma and Aged Retina, UTHSC"
- ],
- [
"HS",
"Heterogeneous Stock"
],
@@ -4210,28 +3905,11 @@
"NZB/FVB N2 NCI"
],
[
- "C57BL-6JxC57BL-6NJF2",
- "Reduced Complexity Cross (B6JxB6N F2)"
- ],
- [
"Retina-RGC-Rheaume",
"Retina RGC Rheaume"
- ],
- [
- "Scripps-2013",
- "Scripps C57BL/6J"
- ],
- [
- "SOTNOT-OHSU",
- "SOTNOT-OHSU"
- ]
- ],
- "poplar": [
- [
- "Poplar",
- "Poplar"
]
],
+ "poplar": [],
"rat": [
[
"HXBBXH",
@@ -4242,30 +3920,12 @@
"NIH Heterogeneous Stock (Palmer)"
],
[
- "HSNIH-RGSMC",
- "NIH Heterogeneous Stock (RGSMC 2013)"
- ],
- [
"SRxSHRSPF2",
"UIOWA SRxSHRSP F2"
]
],
- "soybean": [
- [
- "J12XJ58F11",
- "J12XJ58F11"
- ],
- [
- "J12XJ58F2",
- "J12XJ58F2"
- ]
- ],
- "tomato": [
- [
- "LXP",
- "LXP"
- ]
- ]
+ "soybean": [],
+ "tomato": []
},
"species": [
[
@@ -4318,38 +3978,7 @@
]
]
},
- "arabidopsis": {
- "BayXSha": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
- "ColXBur": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
- "ColXCvi": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ]
- },
+ "arabidopsis": {},
"barley": {
"QSM": [
[
@@ -4889,12 +4518,6 @@
"Primary Visual Cortex mRNA"
]
],
- "HCP": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"HLC": [
[
"Phenotypes",
@@ -4981,12 +4604,6 @@
"Ventrolateral Prefrontal Cortex mRNA"
]
],
- "Islets-Gerling": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"TIGEM-Retina-RNA-Seq": [
[
"Phenotypes",
@@ -5017,30 +4634,6 @@
"Striatum mRNA"
]
],
- "AIL-LGSM-F34-A": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
- "AIL-LGSM-F34-F39-43-GBS": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
- "AIL-LGSM-F34-GBS": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
- "AIL-LGSM-F39-43-GBS": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"AKXD": [
[
"Genotypes",
@@ -5091,12 +4684,6 @@
"Liver mRNA"
]
],
- "B6D2": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"B6D2F2": [
[
"Genotypes",
@@ -5107,16 +4694,6 @@
"Brain mRNA"
]
],
- "B6D2F2-PSU": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
"B6D2RI": [
[
"Phenotypes",
@@ -5333,12 +4910,6 @@
"Ventral Tegmental Area mRNA"
]
],
- "BXD-Bone": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"BXD-Harvested": [
[
"Phenotypes",
@@ -5389,16 +4960,6 @@
"Liver mRNA"
]
],
- "C57BL-6JxC57BL-6NJF2": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
"CFW": [
[
"Phenotypes",
@@ -5441,12 +5002,6 @@
"Midbrain mRNA"
]
],
- "CMS": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"CTB6F2": [
[
"Phenotypes",
@@ -5509,7 +5064,6 @@
"Retina mRNA"
]
],
- "EMSR": [],
"HS": [
[
"Phenotypes",
@@ -5552,16 +5106,6 @@
"Prefrontal Cortex mRNA"
]
],
- "Linsenbardt-Boehm": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
"MDP": [
[
"Phenotypes",
@@ -5611,23 +5155,9 @@
"Retina Single-cell RNA-Seq",
"Retina Single-cell RNA-Seq"
]
- ],
- "SOTNOT-OHSU": [
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
- "Scripps-2013": []
- },
- "poplar": {
- "Poplar": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
]
},
+ "poplar": {},
"rat": {
"HSNIH-Palmer": [
[
@@ -5655,12 +5185,6 @@
"Prelimbic Cortex mRNA"
]
],
- "HSNIH-RGSMC": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ],
"HXBBXH": [
[
"Phenotypes",
@@ -5706,31 +5230,7 @@
]
]
},
- "soybean": {
- "J12XJ58F11": [
- [
- "Phenotypes",
- "Phenotypes"
- ],
- [
- "Genotypes",
- "Genotypes"
- ]
- ],
- "J12XJ58F2": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ]
- },
- "tomato": {
- "LXP": [
- [
- "Phenotypes",
- "Phenotypes"
- ]
- ]
- }
+ "soybean": {},
+ "tomato": {}
}
} \ No newline at end of file