From 624a86a4a24959905673ca2eee9bf20b31c8e139 Mon Sep 17 00:00:00 2001 From: jeff-cohere Date: Wed, 30 Oct 2024 17:24:09 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20kbase/dt?= =?UTF-8?q?spy@e54819e663f38b916103fa95e596d9a3336caabf=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/filter_on_taxon_oid.py | 18 ++++++++++++++++-- examples/index.html | 6 +++--- sitemap.xml.gz | Bin 127 -> 127 bytes 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/examples/filter_on_taxon_oid.py b/examples/filter_on_taxon_oid.py index b8edbdd..29068a2 100644 --- a/examples/filter_on_taxon_oid.py +++ b/examples/filter_on_taxon_oid.py @@ -1,6 +1,7 @@ # This script searches the JGI Data Portal for files related to a given # IMG taxon OID, printing out any related metadata. +import argparse import dts import os @@ -15,9 +16,22 @@ 'extra': 'project_id', # add project_id to returned metadata } +# fetch search arguments from the command line +parser = argparse.ArgumentParser( + prog='filter_on_taxon_oid.py', + description='''a small script that uses dtspy to search the JGI Data Portal +for data associated with a given IMG taxon OID''', +) +parser.add_argument('--taxon_oid', + default = '2708742931', + help = 'an IMG taxon OID with which search results should be associated', + required = False, + type = int, +) +args = parser.parse_args() + # do the search results = dts_client.search(database = 'jdp', - query = '2708742931', + query = f'{args.taxon_oid}', specific = jdp_params) print(results) - diff --git a/examples/index.html b/examples/index.html index 16cc828..fa361ce 100644 --- a/examples/index.html +++ b/examples/index.html @@ -252,14 +252,14 @@

Example scripts

This script searches for files in the JGI Data Portal related to a given IMG taxon OID, printing metadata for any results.

-

This script extracts identifiers from a spreadsheet, +

This script extracts identifiers from a spreadsheet, searches for related files, and writes another spreadsheet with relavent filenames and identifier information.

diff --git a/sitemap.xml.gz b/sitemap.xml.gz index e74d7be6e040d0cc1a3cd188f59f11af4fe8f8e9..059d349bbcde21502177107ec85f0da2b5f2f4af 100644 GIT binary patch delta 13 Ucmb=gXP58h;9w|MoXB1Q02pEeXaE2J delta 13 Ucmb=gXP58h;Al`)n8;oM02#ysl>h($