diff options
author | Munyoki Kilyungi | 2023-01-16 17:16:40 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-01-20 15:02:46 +0300 |
commit | c6d56cd53e54fd352afb91df053cbf2c4a51338b (patch) | |
tree | 68d79b8307fa74367efb14cf69c4ffbdc857ebac | |
parent | 000880beabe2fe495f048669c37634d55cfc3610 (diff) | |
download | genenetwork2-c6d56cd53e54fd352afb91df053cbf2c4a51338b.tar.gz |
Add example that demos dumping data from an entire dataset
-rw-r--r-- | scripts/sampledata.py | 11 |
1 files changed, 11 insertions, 0 deletions
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! |