From c6d56cd53e54fd352afb91df053cbf2c4a51338b Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 16 Jan 2023 17:16:40 +0300 Subject: Add example that demos dumping data from an entire dataset --- scripts/sampledata.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/sampledata.py b/scripts/sampledata.py index fb3668d6..2aef6968 100644 --- a/scripts/sampledata.py +++ b/scripts/sampledata.py @@ -59,3 +59,14 @@ def fetch_all_traits(species, group, type_, dataset): "search_terms_or": "*", }).trait_list: yield result.get('name') + + +# Dump all traits from a given dataset +for trait in fetch_all_traits( + species="mouse", + group="BXD", + type_="Phenotypes", + dataset="BXDPublish", +): + print(json.dumps(dump_sample_data("BXDPublish", trait))) + break # Just do this once! -- cgit v1.2.3