changeset 3:d1789b4821fc draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit dae34e5e182b4cceb808d7353080f14aa9a78ca9"
author iuc
date Wed, 23 Sep 2020 09:51:30 +0000
parents 08412cd072d0
children 85d9183d1200
files __efetch_build_options.py ecitmatch.py efetch.py egquery.py egquery.xml einfo.py elink.py epost.py esearch.py esummary.py eutils.py generate_macros_xml.pl macros.xml test-data/efetchin.tabular test-data/einfo.dblist.xml test-data/elink.elinkin_1link.json test-data/elink.elinkin_1link_hist.json test-data/elink.elinkin_1link_id.tabular test-data/elink.elinkin_allalllinks_id.xml test-data/elink.elinkin_alllinks_id.xml test-data/elink.esearch_in_xmlid.xml test-data/elink.esearch_in_xmlid_1link.tabular test-data/elink.esearchin_id.json test-data/elink.esearchin_id.tabular test-data/elink.esearchin_id_1link.xml test-data/elink.esearchin_id_alllinks.json test-data/esearch.gene.hist.json test-data/esearch.gene.hist.xml test-data/esearch.gene.json test-data/esearch.gene.tabular test-data/esearch.gene.xml
diffstat 31 files changed, 6171 insertions(+), 801 deletions(-) [+]
line wrap: on
line diff
--- a/__efetch_build_options.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/__efetch_build_options.py	Wed Sep 23 09:51:30 2020 +0000
@@ -53,7 +53,7 @@
 <DbName>sra</DbName>
 <DbName>structure</DbName>
 <DbName>taxonomy</DbName>
-<DbName>unigene</DbName>'''.replace( "<DbName>", "").replace( "</DbName>", "").split("\n")
+<DbName>unigene</DbName>'''.replace("<DbName>", "").replace("</DbName>", "").split("\n")
 
 
 help = '''  (all)
--- a/ecitmatch.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/ecitmatch.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
 
@@ -17,6 +16,8 @@
     parser.add_argument('--first_page', nargs='*', help='First Page')
     parser.add_argument('--author_name', nargs='*', help='Author name')
 
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
+
     # Emails
     parser.add_argument('--user_email', help="User email")
     parser.add_argument('--admin_email', help="Admin email")
--- a/efetch.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/efetch.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,36 +1,111 @@
 #!/usr/bin/env python
+
 import argparse
+import glob
+import json
+import logging
+import os
+
 
 import eutils
 
 
+logging.basicConfig(level=logging.INFO)
+
+
+def handleEfetchException(e, db, payload):
+    logging.error('No results returned. This could either be due to no records matching the supplied IDs for the query database or it could be an error due to invalid parameters.  The reported exception was "%s".\n\nPayload used for the efetch query to database "%s"\n\n%s', e, db, json.dumps(payload, indent=4))
+
+    # Create a file in the downloads folder so that the user can access run information
+    current_directory = os.getcwd()
+    final_directory = os.path.join(current_directory, r'downloads')
+    if not os.path.exists(final_directory):
+        os.makedirs(final_directory)
+
+    print('The following files were downloaded:')
+    print(os.listdir(final_directory))
+
+    file_path = os.path.join('downloads', 'no_results.txt')
+    with open(file_path, 'w') as handle:
+        handle.write('No results')
+
+
+def localFetch(db, gformat, newname, **payload):
+    problem = None
+    try:
+        c.fetch(db, **payload)
+
+        for chunk, file in enumerate(glob.glob('downloads/EFetch *')):
+            os.rename(file, '%s%s.%s' % (newname, chunk + 1, gformat))
+
+    except Exception as e:
+        problem = e
+        handleEfetchException(e, db, payload)
+    else:
+        print('The following files were downloaded:')
+        print(os.listdir('downloads'))
+
+    return problem
+
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='EFetch', epilog='')
     parser.add_argument('db', help='Database to use')
     parser.add_argument('--user_email', help="User email")
     parser.add_argument('--admin_email', help="Admin email")
 
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
+
     # ID source
+    parser.add_argument('--id_json', help='list of ids in a json file as returned by esearch or elink')
+    parser.add_argument('--id_xml', help='list of ids in an xml file as returned by esearch or elink')
     parser.add_argument('--id_list', help='list of ids')
     parser.add_argument('--id', help='Comma separated individual IDs')
-    parser.add_argument('--history_file', help='Fetch results from previous query')
+    parser.add_argument('--history_file', help='Fetch results from previous query (JSON)')
+    parser.add_argument('--history_xml', help='Fetch results from previous query (XML)')
 
     # Output
     parser.add_argument('--retmode', help='Retmode')
     parser.add_argument('--rettype', help='Rettype')
+    parser.add_argument('--galaxy_format', help='Galaxy format')
     args = parser.parse_args()
 
     c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email)
-    merged_ids = c.parse_ids(args.id_list, args.id, args.history_file)
 
     payload = {}
-    if args.history_file is not None:
-        payload.update(c.get_history())
-    else:
-        payload['id'] = ','.join(merged_ids)
-
     for attr in ('retmode', 'rettype'):
         if getattr(args, attr, None) is not None:
             payload[attr] = getattr(args, attr)
 
-    c.fetch(args.db, ftype=args.retmode, **payload)
+    if args.history_file is not None or args.history_xml is not None:
+        if args.history_file is not None:
+            input_histories = c.get_histories()
+        else:
+            input_histories = c.extract_histories_from_xml_file(args.history_xml)
+
+        problem = None
+        for hist in input_histories:
+            qkey = hist['query_key']
+            tmp_payload = payload
+            tmp_payload.update(hist)
+            newname = 'downloads/EFetch-%s-%s-querykey%s-chunk' % (args.rettype, args.retmode, qkey)
+            problem = localFetch(args.db, args.galaxy_format, newname, **tmp_payload)
+
+            if os.path.exists('downloads'):
+                os.rename('downloads', 'downloads-qkey%s' % (qkey))
+
+        if not os.path.exists('downloads'):
+            os.makedirs('downloads')
+
+        for relpath in glob.glob('downloads-qkey*/*'):
+            file = os.path.basename(relpath)
+            os.rename(relpath, 'downloads/%s' % (file))
+
+        if problem is not None:
+            raise(problem)
+
+    else:
+        merged_ids = c.parse_ids(args.id_list, args.id, args.history_file, args.id_xml, args.id_json)
+        payload['id'] = ','.join(merged_ids)
+        newname = 'downloads/EFetch-%s-%s-chunk' % (args.rettype, args.retmode)
+        localFetch(args.db, args.galaxy_format, newname, **payload)
--- a/egquery.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/egquery.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
 
@@ -9,9 +8,12 @@
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='EGQuery', epilog='')
     parser.add_argument('term', help='Query')
-    #
+
     parser.add_argument('--user_email', help="User email")
     parser.add_argument('--admin_email', help="Admin email")
+
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
+
     args = parser.parse_args()
 
     c = eutils.Client(user_email=args.user_email, admin_email=args.admin_email)
--- a/egquery.xml	Wed Mar 11 04:02:33 2020 -0400
+++ b/egquery.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -26,9 +26,9 @@
   </inputs>
   <outputs>
     <data format="xml" name="default" label="EGQuery Results for $term"/>
-    <expand macro="history_out">
+    <data format="json" name="history" label="NCBI History">
       <filter>use_history</filter>
-    </expand>
+    </data>
   </outputs>
   <tests>
     <test>
--- a/einfo.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/einfo.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
 
@@ -11,6 +10,7 @@
     parser.add_argument('--db', help='Database to use')
     parser.add_argument('--user_email', help="User email")
     parser.add_argument('--admin_email', help="Admin email")
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
     args = parser.parse_args()
 
     c = eutils.Client(user_email=args.user_email, admin_email=args.admin_email)
--- a/elink.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/elink.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,12 +1,16 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
 import json
+import logging
+import os
 
 import eutils
 
 
+logging.basicConfig(level=logging.INFO)
+
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='EFetch', epilog='')
     parser.add_argument('db', help='Database to use, sometimes "none" (e.g. *check)')
@@ -15,16 +19,23 @@
                                         'neighbor_history', 'acheck', 'ncheck', 'lcheck',
                                         'llinks', 'llinkslib', 'prlinks'],
                         help='ELink command mode')
-    # Only used in case of neighbor_history
-    parser.add_argument('--history_out', type=argparse.FileType('w'),
-                        help='Output history file', default='-')
+
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
 
     parser.add_argument('--user_email', help="User email")
     parser.add_argument('--admin_email', help="Admin email")
+
     # ID Sources
+    parser.add_argument('--id_xml', help='list of ids in an xml file as returned by esearch or elink')
+    parser.add_argument('--id_json', help='list of ids in a json file as returned by esearch or elink')
     parser.add_argument('--id_list', help='list of ids')
     parser.add_argument('--id', help='Comma separated individual IDs')
     parser.add_argument('--history_file', help='Fetch results from previous query')
+    parser.add_argument('--history_xml', help='Fetch results from previous query')
+
+    # Optional
+    parser.add_argument('--linkname', help='Restrict results to a specific link source')
+    parser.add_argument('--retmode', choices=['xml', 'json', 'uilist'], help='Output format')
 
     # TODO: dates, linkname, term, holding
     # neighbor or neighbor_history and dbfrom is pubmed
@@ -37,25 +48,91 @@
     args = parser.parse_args()
 
     c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email)
-    merged_ids = c.parse_ids(args.id_list, args.id, args.history_file)
 
     payload = {
         'dbfrom': args.dbfrom,
         'cmd': args.cmd,
     }
-    if args.history_file is not None:
-        payload.update(c.get_history())
-    else:
-        payload['id'] = ','.join(merged_ids)
 
     # DB can be 'none' in a few cases.
     if args.db != "none":
         payload['db'] = args.db
 
-    results = c.link(**payload)
+    if args.linkname is not None:
+        payload['linkname'] = args.linkname
+
+    results = []
+    qkeys = []
+    if args.history_file is not None or args.history_xml is not None:
+        payload['retmode'] = args.retmode
+        if args.history_file is not None:
+            input_histories = c.get_histories()
+        else:
+            input_histories = c.extract_histories_from_xml_file(args.history_xml)
+        for hist in input_histories:
+            qkeys += [hist['query_key']]
+            tmp_payload = payload
+            tmp_payload.update(hist)
+            results += [c.link(**tmp_payload)]
+    else:
+        # There is no uilist retmode
+        if args.retmode == "uilist":
+            payload['retmode'] = 'xml'
+        else:
+            payload['retmode'] = args.retmode
+        merged_ids = c.parse_ids(args.id_list, args.id, args.history_file, args.id_xml, args.id_json)
+        payload['id'] = ','.join(merged_ids)
+        qkeys += [1]
+        results += [c.link(**payload)]
+
+    # There could be multiple sets of results if a history was supplied
+    if args.history_file is not None or args.history_xml is not None:
+        # Multiple result sets can be returned
+        # Create a directory for the output files
+        current_directory = os.getcwd()
+        final_directory = os.path.join(current_directory, r'downloads')
+        if not os.path.exists(final_directory):
+            os.makedirs(final_directory)
 
-    if args.cmd == "neighbor_history":
-        history = c.extract_history(results)
-        args.history_out.write(json.dumps(history, indent=4))
-
-    print(results)
+        logging.info("Writing files:")
+        # When rettype is uilist, convert to text format (which elink does not do)
+        count = 0
+        if args.retmode == 'uilist':
+            for result in results:
+                qkey = qkeys[count]
+                count += 1
+                ids = c.xmlstring2UIlist(result)
+                file_path = os.path.join('downloads', '%s-querykey%s.tabular' % (args.db, qkey))
+                logging.info('%s.tabular' % (args.db))
+                with open(file_path, 'w') as handle:
+                    for id in ids:
+                        handle.write(id)
+                        handle.write(os.linesep)
+        elif args.retmode == 'json':
+            for result in results:
+                qkey = qkeys[count]
+                count += 1
+                file_path = os.path.join('downloads', '%s-querykey%s.json' % (args.db, qkey))
+                logging.info('%s-link%s.json' % (args.db, count))
+                with open(file_path, 'w') as handle:
+                    json_data = c.jsonstring2jsondata(result)
+                    handle.write(json.dumps(json_data, indent=4))
+        else:
+            for result in results:
+                qkey = qkeys[count]
+                count += 1
+                file_path = os.path.join('downloads', '%s-querykey%s.xml' % (args.db, qkey))
+                logging.info('%s-link%s.xml' % (args.db, count))
+                with open(file_path, 'w') as handle:
+                    handle.write(result)
+    else:
+        # When rettype is uilist, convert to text format (which elink does not do)
+        if args.retmode == 'uilist':
+            ids = c.xmlstring2UIlist(results[0])
+            for id in ids:
+                print(id)
+        elif args.retmode == 'json':
+            json_data = c.jsonstring2jsondata(results[0])
+            print(json.dumps(json_data, indent=4))
+        else:
+            print(results[0])
--- a/epost.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/epost.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
 
@@ -9,22 +8,37 @@
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='EPost', epilog='')
     parser.add_argument('db', help='Database to use')
+    parser.add_argument('--user_email', help="User email")
+    parser.add_argument('--admin_email', help="Admin email")
+
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
+
+    # ID source
     parser.add_argument('--id_list', help='list of ids')
     parser.add_argument('--id', help='Comma separated individual IDs')
-    parser.add_argument('--history_file', help='Post to new QueryKey in an existing WebEnv')
-    parser.add_argument('--user_email', help="User email")
-    parser.add_argument('--admin_email', help="Admin email")
+    parser.add_argument('--id_json', help='list of ids in a json file as returned by esearch or elink')
+    parser.add_argument('--id_xml', help='list of ids in an xml file as returned by esearch or elink')
+
+    # Target history
+    parser.add_argument('--history_xml', help='Post to new QueryKey in an existing WebEnv (XML)')
+    parser.add_argument('--history_file', help='Post to new QueryKey in an existing WebEnv (JSON)')
+    parser.add_argument('--webenv', help='Post to new WebEnv (History ID)')
 
     args = parser.parse_args()
 
     c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email)
-    merged_ids = c.parse_ids(args.id_list, args.id, args.history_file)
 
     payload = {}
     if args.history_file is not None:
-        payload.update(c.get_history())
-    else:
-        payload['id'] = ','.join(merged_ids)
-        payload['WebEnv'] = ''
+        hist = c.get_history()
+        payload['WebEnv'] = hist['WebEnv']
+    elif args.history_xml is not None:
+        hist = c.extract_history_from_xml_file(args.history_xml)
+        payload['WebEnv'] = hist['WebEnv']
+    elif args.webenv is not None:
+        payload['WebEnv'] = args.webenv
+
+    merged_ids = c.parse_ids(args.id_list, args.id, None, args.id_xml, args.id_json)
+    payload['id'] = ','.join(merged_ids)
 
     print(c.post(args.db, **payload))
--- a/esearch.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/esearch.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,12 +1,16 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
 import json
+import logging
+
 
 import eutils
 
 
+logging.basicConfig(level=logging.INFO)
+
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='ESearch', epilog='')
     parser.add_argument('db', help='Database to use')
@@ -17,34 +21,54 @@
     parser.add_argument('--mindate', help='Minimum date')
     parser.add_argument('--maxdate', help='maximum date')
     # History
-    parser.add_argument('--history_out', type=argparse.FileType('w'),
-                        help='Output history file')
+    parser.add_argument('--history_out', action="store_true", help='Output history file')
     parser.add_argument('--user_email', help="User email")
     parser.add_argument('--admin_email', help="Admin email")
+
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
+
+    # Output
+    parser.add_argument('--retmode', help='Retmode')
+    parser.add_argument('--rettype', help='Rettype')
+    parser.add_argument('--retstart', type=int, default=0, help='Retstart - Starting rec number (0)')
+    parser.add_argument('--retmax', type=int, default=20, help='Retmax - max number of recs returned (20, max 100000)')
+
     args = parser.parse_args()
 
     c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email)
 
+    max_retmax = 100000
+    min_retmax = 1
+    max = max(min(args.retmax, max_retmax), min_retmax)
+
     payload = {
         'db': args.db,
         'term': args.term,
-        'retstart': 0,
-        'retmax': 20,
-        # hmmm @ retmax
     }
     if args.history_file is not None:
         payload.update(c.get_history())
-    if args.history_out is not None:
+
+    # if args.history_out is not None:
+    if args.history_out:
         payload['usehistory'] = 'y'
 
-    for attr in ('datetype', 'reldate', 'mindate', 'maxdate'):
+    payload['retmode'] = args.retmode
+
+    for attr in ('datetype', 'reldate', 'mindate', 'maxdate', 'rettype', 'retmax', 'retstart'):
         if getattr(args, attr, None) is not None:
             payload[attr] = getattr(args, attr)
 
+    logging.info("Payload used for query:" + json.dumps(payload, indent=4))
+
     results = c.search(**payload)
 
-    if args.history_out is not None:
-        history = c.extract_history(results)
-        args.history_out.write(json.dumps(history, indent=4))
-
-    print(results)
+    # We're going to infer that rettype being uilist means convert to text format (which esearch does not do)
+    if args.retmode == 'text':
+        ids = c.xmlstring2UIlist(results)
+        for id in ids:
+            print(id)
+    elif args.retmode == 'json':
+        json_data = c.jsonstring2jsondata(results)
+        print(json.dumps(json_data, indent=4))
+    else:
+        print(results)
--- a/esummary.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/esummary.py	Wed Sep 23 09:51:30 2020 +0000
@@ -1,32 +1,106 @@
 #!/usr/bin/env python
-from __future__ import print_function
 
 import argparse
+import json
+import logging
+import os
 
 import eutils
 
 
+logging.basicConfig(level=logging.INFO)
+
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='ESummary', epilog='')
     parser.add_argument('db', help='Database to use')
+    parser.add_argument('--user_email', help="User email")
+    parser.add_argument('--admin_email', help="Admin email")
+
+    parser.add_argument('--version', action='version', version=eutils.Client.getVersion(), help='Version (reports Biopython version)')
+
+    # ID source
+    parser.add_argument('--id_xml', help='list of ids in an xml file as returned by esearch or elink')
+    parser.add_argument('--id_json', help='list of ids in a json file as returned by esearch or elink')
     parser.add_argument('--id_list', help='list of ids')
     parser.add_argument('--id', help='Comma separated individual IDs')
-    parser.add_argument('--history_file', help='Filter existing history')
-    parser.add_argument('--user_email', help="User email")
-    parser.add_argument('--admin_email', help="Admin email")
+    parser.add_argument('--history_file', help='Fetch results from previous query')
+    parser.add_argument('--history_xml', help='Fetch results from previous query')
+
+    # Output
+    parser.add_argument('--retmode', help='Retmode')
+    parser.add_argument('--retstart', type=int, default=0, help='Retstart - Starting rec number (0)')
+    parser.add_argument('--retmax', type=int, default=20, help='Retmax - max number of recs returned (20, max 100000')
+
     args = parser.parse_args()
 
     c = eutils.Client(history_file=args.history_file, user_email=args.user_email, admin_email=args.admin_email)
 
-    merged_ids = c.parse_ids(args.id_list, args.id, args.history_file)
-
     payload = {
         'db': args.db,
     }
 
-    if args.history_file is not None:
-        payload.update(c.get_history())
+    for attr in ('retmode', 'retmax', 'retstart'):
+        if getattr(args, attr, None) is not None:
+            payload[attr] = getattr(args, attr)
+
+    results = []
+    qkeys = []
+    if args.history_file is not None or args.history_xml is not None:
+        payload['retmode'] = args.retmode
+        if args.history_file is not None:
+            input_histories = c.get_histories()
+        else:
+            input_histories = c.extract_histories_from_xml_file(args.history_xml)
+
+        for hist in input_histories:
+            qkeys += [hist['query_key']]
+            tmp_payload = payload
+            tmp_payload.update(hist)
+            results += [c.summary(**tmp_payload)]
     else:
+        # There is no uilist retmode
+        if args.retmode == "uilist":
+            payload['retmode'] = 'xml'
+        else:
+            payload['retmode'] = args.retmode
+        merged_ids = c.parse_ids(args.id_list, args.id, args.history_file, args.id_xml, args.id_json)
         payload['id'] = ','.join(merged_ids)
+        qkeys += [1]
+        results += [c.summary(**payload)]
+
+    # There could be multiple sets of results if a history was supplied
+    if args.history_file is not None or args.history_xml is not None:
+        # Multiple result sets can be returned
+        # Create a directory for the output files
+        current_directory = os.getcwd()
+        final_directory = os.path.join(current_directory, r'downloads')
+        if not os.path.exists(final_directory):
+            os.makedirs(final_directory)
 
-    print(c.summary(**payload))
+        logging.info("Writing files:")
+        count = 0
+        if args.retmode == 'json':
+            for result in results:
+                qkey = qkeys[count]
+                count += 1
+                file_path = os.path.join('downloads', '%s-querykey%s.json' % (args.db, qkey))
+                logging.info('%s-link%s.json' % (args.db, count))
+                with open(file_path, 'w') as handle:
+                    json_data = c.jsonstring2jsondata(result)
+                    handle.write(json.dumps(json_data, indent=4))
+        else:
+            for result in results:
+                qkey = qkeys[count]
+                count += 1
+                file_path = os.path.join('downloads', '%s-querykey%s.xml' % (args.db, qkey))
+                logging.info('%s-link%s.xml' % (args.db, count))
+                with open(file_path, 'w') as handle:
+                    handle.write(result)
+    else:
+        # When rettype is uilist, convert to text format (which elink does not do)
+        if args.retmode == 'json':
+            json_data = c.jsonstring2jsondata(results[0])
+            print(json.dumps(json_data, indent=4))
+        else:
+            print(results[0])
--- a/eutils.py	Wed Mar 11 04:02:33 2020 -0400
+++ b/eutils.py	Wed Sep 23 09:51:30 2020 +0000
@@ -12,6 +12,7 @@
 
     def __init__(self, history_file=None, user_email=None, admin_email=None):
         self.using_history = False
+        self.using_parsedids = False
 
         if user_email is not None and admin_email is not None:
             Entrez.email = ';'.join((admin_email, user_email))
@@ -29,18 +30,69 @@
         if history_file is not None:
             with open(history_file, 'r') as handle:
                 data = json.loads(handle.read())
-                self.query_key = data['QueryKey']
-                self.webenv = data['WebEnv']
-                self.using_history = True
+                # esearch
+                if 'QueryKey' in data:
+                    self.query_key = data['QueryKey']
+                    self.webenv = data['WebEnv']
+                    self.query_keys = []
+                    self.query_keys += [data['QueryKey']]
+                    self.using_history = True
+                elif 'query_key' in data:
+                    self.query_key = data['query_key']
+                    self.webenv = data['WebEnv']
+                    self.query_keys = []
+                    self.query_keys += [data['query_key']]
+                    self.using_history = True
+                elif 'esearchresult' in data:
+                    self.query_key = data['esearchresult']['querykey']
+                    self.webenv = data['esearchresult']['webenv']
+                    self.query_keys = []
+                    self.query_keys += [data['esearchresult']['querykey']]
+                    self.using_history = True
+                # elink
+                elif 'linksets' in data:
+                    # elink for cmd=neighbor_history
+                    if 'linksetdbhistories' in data['linksets'][0]:
+                        self.webenv = data['linksets'][0]['webenv']
+                        self.query_key = data['linksets'][0]['linksetdbhistories'][0]['querykey']
+                        self.using_history = True
+                    # elink for cmd=neighbor|neighbor_score
+                    elif 'linksetdbs' in data['linksets'][0]:
+                        self.using_parsedids = True
+                        # elink for neighbor
+                        if isinstance(data['linksets'][0]['linksetdbs'][0]['links'][0], str):
+                            self.idstr = ','.join(data['linksets'][0]['linksetdbs'][0]['links'])
+                        # elink for neighbor_score
+                        else:
+                            self.idstr = ','.join(map(lambda x: x['id'], data['linksets'][0]['linksetdbs'][0]['links']))
+                    if 'linksetdbhistories' in data['linksets'][0]:
+                        self.webenv = data['linksets'][0]['webenv']
+                        self.query_keys = []
+                        for query in data['linksets'][0]['linksetdbhistories']:
+                            if 'querykey' in query:
+                                self.query_keys += [query['querykey']]
+                else:
+                    print("No match")
+                    print(data)
 
     def get_history(self):
-        if not self.using_history:
-            return {}
-        else:
+        if self.using_history:
             return {
                 'query_key': self.query_key,
                 'WebEnv': self.webenv,
             }
+        elif self.using_parsedids:
+            return {
+                'id': self.idstr,
+            }
+        else:
+            return {}
+
+    def get_histories(self):
+        histories = []
+        for key in self.query_keys:
+            histories += [{'WebEnv': self.webenv, 'query_key': key}]
+        return histories
 
     def post(self, database, **payload):
         return json.dumps(Entrez.read(Entrez.epost(database, **payload)), indent=4)
@@ -50,8 +102,10 @@
 
         if 'id' in payload:
             summary = self.id_summary(db, payload['id'])
+        elif 'WebEnv' not in payload or 'query_key' not in payload:
+            summary = self.history_summary(db)
         else:
-            summary = self.history_summary(db)
+            summary = payload
 
         count = len(summary)
         payload['retmax'] = BATCH_SIZE
@@ -87,15 +141,90 @@
     def link(self, **payload):
         return Entrez.elink(**payload).read()
 
-    def extract_history(self, xml_data):
-        parsed_data = Entrez.read(StringIO.StringIO(xml_data))
+    def extract_history_from_xml_file(self, xml_file):
         history = {}
-        for key in ('QueryKey', 'WebEnv'):
-            if key in parsed_data:
-                history[key] = parsed_data[key]
+        with open(xml_file, 'r') as handle:
+            xml_str = handle.read()
+            history = self.extract_history_from_xml(xml_str)
+        return history
+
+    def extract_history_from_xml(self, xml_str):
+        try:
+            parsed_data = Entrez.read(StringIO(xml_str))
+            history = {}
+            gotit = 0
+
+            # New code doesn't work for esearch input to elink - Parsing esearch output (reading an xml history) does not work as an elink input payload, which needs 'QueryKey'.  Notably, if parsing elink output as input to elink, conversion of xml 'QueryKey' to 'query_key' is needed for some reason.  Also Notably, efetch returned results using the 'QueryKey' key
+            # For esearch xml history results
+            if 'QueryKey' in parsed_data:
+                history['query_key'] = parsed_data['QueryKey']
+                gotit += 1
+            if 'WebEnv' in parsed_data:
+                history['WebEnv'] = parsed_data['WebEnv']
+                gotit += 1
+            # For elink xml history results
+            if gotit < 2:
+                if 'LinkSetDbHistory' in parsed_data[0]:
+                    if 'QueryKey' in parsed_data[0]['LinkSetDbHistory'][0]:
+                        history['query_key'] = parsed_data[0]['LinkSetDbHistory'][0]['QueryKey']
+                        gotit += 1
+                if 'WebEnv' in parsed_data[0]:
+                    history['WebEnv'] = parsed_data[0]['WebEnv']
+                    gotit += 1
+                if gotit < 2:
+                    raise Exception("Could not find WebEnv in xml response")
+        except Exception as e:
+            print("Error parsing...")
+            print(xml_str)
+            raise(e)
 
         return history
 
+    def extract_histories_from_xml_file(self, xml_file):
+        histories = []
+        with open(xml_file, 'r') as handle:
+            xml_str = handle.read()
+            histories = self.extract_histories_from_xml(xml_str)
+        return histories
+
+    def extract_histories_from_xml(self, xml_str):
+        try:
+            parsed_data = Entrez.read(StringIO(xml_str))
+            histories = []
+            gotit = 0
+
+            # New code doesn't work for esearch input to elink - Parsing esearch output (reading an xml history) does not work as an elink input payload, which needs 'QueryKey'.  Notably, if parsing elink output as input to elink, conversion of xml 'QueryKey' to 'query_key' is needed for some reason.  Also Notably, efetch returned results using the 'QueryKey' key
+            # For esearch xml history results
+            if 'QueryKey' in parsed_data:
+                tmp_hist = {}
+                tmp_hist['query_key'] = parsed_data['QueryKey']
+                gotit += 1
+            if 'WebEnv' in parsed_data:
+                tmp_hist['WebEnv'] = parsed_data['WebEnv']
+                gotit += 1
+            if gotit == 2:
+                histories += [tmp_hist]
+            # For elink xml history results
+            else:
+                gotenv = 0
+                if 'LinkSetDbHistory' in parsed_data[0]:
+                    for query in parsed_data[0]['LinkSetDbHistory']:
+                        tmp_hist = {}
+                        if 'WebEnv' in parsed_data[0]:
+                            tmp_hist['WebEnv'] = parsed_data[0]['WebEnv']
+                        if 'QueryKey' in query:
+                            tmp_hist['query_key'] = query['QueryKey']
+                            histories += [tmp_hist]
+                            gotit += 1
+                if gotit == 0 and gotenv == 0:
+                    raise Exception("Could not find WebEnv in xml response")
+        except Exception as e:
+            print("Error parsing...")
+            print(xml_str)
+            raise(e)
+
+        return histories
+
     def search(self, **payload):
         return Entrez.esearch(**payload).read()
 
@@ -109,7 +238,90 @@
         return Entrez.ecitmatch(**kwargs).read()
 
     @classmethod
-    def parse_ids(cls, id_list, id, history_file):
+    def jsonstring2jsondata(cls, json_str):
+        json_handle = StringIO(json_str)
+        json_data = json.loads(json_handle.read())
+        return json_data
+
+    @classmethod
+    def jsonfile2UIlist(cls, json_file):
+        merged_ids = []
+        with open(json_file, 'r') as handle:
+            json_data = json.loads(handle.read())
+            for id in cls.jsondata2UIlist(json_data):
+                merged_ids += [id]
+        return merged_ids
+
+    @classmethod
+    def jsondata2UIlist(cls, json_data):
+        merged_ids = []
+
+        # Always prioritize the result links as opposed to the search links
+        # elink - retrieves linked IDs for cmd=neighbor|neighbor_score only
+        if 'linksets' in json_data:
+            for lnk in json_data['linksets'][0]['linksetdbs']:
+                if 'links' in lnk:
+                    for id in lnk['links']:
+                        # elink for neighbor
+                        if isinstance(id, str):
+                            merged_ids.append(id)
+                        # elink for neighbor_score
+                        else:
+                            merged_ids.append(id['id'])
+        # esearch
+        elif 'esearchresult' in json_data:
+            for id in json_data['esearchresult']['idlist']:
+                merged_ids += [id]
+
+        return merged_ids
+
+    @classmethod
+    def xmlfile2UIlist(cls, xml_file):
+        merged_ids = []
+        with open(xml_file, 'r') as handle:
+            xml_data = Entrez.read(handle)
+            for id in cls.xmldata2UIlist(xml_data):
+                merged_ids += [id]
+        return merged_ids
+
+    @classmethod
+    def xmlstring2UIlist(cls, xml_str):
+        merged_ids = []
+        xml_data = Entrez.read(StringIO(xml_str))
+        for id in cls.xmldata2UIlist(xml_data):
+            merged_ids += [id]
+        return merged_ids
+
+    @classmethod
+    def xmldata2UIlist(cls, xml_data):
+        merged_ids = []
+
+        try:
+            # Always prioritize the result links as opposed to the search links
+            # elink - retrieves linked IDs for cmd=neighbor|neighbor_score only
+            if 'LinkSetDb' in xml_data[0]:
+                for lnk in xml_data[0]['LinkSetDb'][0]['Link']:
+                    # elink for neighbor
+                    if isinstance(lnk, str):
+                        merged_ids.append(lnk)
+                    # elink for neighbor_score
+                    else:
+                        merged_ids.append(lnk['Id'])
+            # esearch
+            elif 'IdList' in xml_data:
+                for id in xml_data['IdList']:
+                    merged_ids += [id]
+        # If it was not elink output, we will end up here
+        except Exception:
+            # esearch
+            if 'IdList' in xml_data:
+                for id in xml_data['IdList']:
+                    merged_ids += [id]
+
+        return merged_ids
+
+    @classmethod
+    def parse_ids(cls, id_list, id, history_file, xml_file, json_file):
         """Parse IDs passed on --cli or in a file passed to the cli
         """
         merged_ids = []
@@ -122,8 +334,21 @@
             with open(id_list, 'r') as handle:
                 merged_ids += [x.strip() for x in handle.readlines()]
 
-        # Exception hanlded here for uniformity
-        if len(merged_ids) == 0 and history_file is None:
-            raise Exception("Must provide history file or IDs")
+        if xml_file is not None:
+            tmp_ids = cls.xmlfile2UIlist(xml_file)
+            for id in tmp_ids:
+                merged_ids += [id]
+
+        if json_file is not None:
+            tmp_ids = cls.jsonfile2UIlist(json_file)
+            for id in tmp_ids:
+                merged_ids += [id]
 
         return merged_ids
+
+    @classmethod
+    def getVersion(cls):
+        """Return the biopython version
+        """
+        import Bio
+        return Bio.__version__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/generate_macros_xml.pl	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,841 @@
+#!/usr/bin/env perl
+
+#Usage: perl generate_macros_xml.pl > macros.xml
+
+#Note, this script uses einfo.py to get database info.  It also uses manually compiled data stored at the bottom of this script that is based on: https://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.T._valid_values_of__retmode_and/?report=objectonly
+#The data in the table on that page was manipulated to replace nulls with 'none', remove duplicates, and add missing formats based on correspondence with MLN.
+
+##
+## use einfo to retrieve all the valid databases
+##
+
+print STDERR "Retrieving database list\n";
+
+my $dbxml = `python einfo.py --user_email "planemo@galaxyproject.org" --admin_email "planemo@galaxyproject.org;test@bx.psu.edu"`;
+
+my(@dblist);
+my $dbs     = {};
+my $dbfroms = {};
+my $dbnames = {};
+foreach(split(/\n/,$dbxml))
+  {
+    if(/<DbName>(.+)<\/DbName>/)
+      {
+        my $db = $1;
+        push(@dblist,$db);
+        $dbs->{$db}     = 0;
+        $dbfroms->{$db} = 0;
+        $dbnames->{$db} = $_;
+      }
+  }
+
+##
+## Use einfo to retrieve all the valid links for each database (Note: some databases are not linked)
+##
+
+my $h = {};
+foreach my $db (sort {$dbnames->{$a} cmp $dbnames->{$b}} @dblist)
+  {
+    sleep(2);
+
+    print STDERR "Retrieving info for $db\n";
+
+    my $response = `python einfo.py --db $db --user_email "planemo\@galaxyproject.org" --admin_email "planemo\@galaxyproject.org;test\@bx.psu.edu"`;
+
+    my $dolinks = 0;
+    my $link    = "";
+    my $name    = "";
+
+    foreach(split(/\n/,$response))
+      {
+        if(/<LinkList>/)
+          {
+            $dolinks = 1;
+            #Save whether there exist links from this database
+            $dbfroms->{$db} = 1;
+          }
+        elsif(!$dolinks)
+          {
+            if(/<MenuName>(.+)<\/MenuName>/)
+              {$dbnames->{$db} = "$1 ($db)"}
+          }
+        elsif($dolinks)
+          {
+            if(/<Name>(.+)<\/Name>/)
+              {$link=$1}
+            elsif(/<Menu>(.*)<\/Menu>/)
+              {$name=$1}
+            elsif(/<DbTo>(.+)<\/DbTo>/)
+              {
+                $dbto=$1;
+                push(@{$h->{$db}->{$dbto}},[$link,$name]);
+                $link="";
+                $name="";
+              }
+          }
+      }
+  }
+
+my @sorted_dblist = sort {$dbnames->{$a} cmp $dbnames->{$b}} @dblist;
+
+##
+## Generate XML to govern the valid databases to use with efetch
+##
+
+my $efetch_dbhash = {}; #->{efetch-compatible-db}->{rettype-retmode-galaxy_format} = format_name (galaxy_format)
+while(<DATA>)
+  {
+    chomp;
+    my($db,$galaxy_format,$retmode,$rettype,$format_name) = split(/\t/,$_);
+    $efetch_dbhash->{$db}->{"$rettype-$retmode-$galaxy_format"} =
+      "$format_name ($galaxy_format)";
+  }
+
+#EFetch database select list
+
+print << 'EOXML';
+  <xml name="dbselect_efetch" token_name="db_select" token_label="NCBI Database to Query">
+    <param name="@NAME@" type="select" label="@LABEL@">
+EOXML
+
+foreach my $db (grep {exists($dbs->{$_})}
+                sort {$dbnames->{$a} cmp $dbnames->{$b}}
+                keys(%$efetch_dbhash))
+  {
+    my $selected = '';
+    if($db eq 'pubmed')
+      {$selected = ' selected="True"'}
+    print << "    EOXML";
+      <option value="$db"$selected>$dbnames->{$db}</option>
+    EOXML
+  }
+
+print << 'EOXML';
+    </param>
+  </xml>
+EOXML
+
+#EFetch output formats
+
+print << 'EOXML';
+  <xml name="efetchdb">
+    <conditional name="db">
+      <expand macro="dbselect_efetch" />
+EOXML
+
+foreach my $db (grep {exists($dbs->{$_})}
+                sort {$dbnames->{$a} cmp $dbnames->{$b}}
+                keys(%$efetch_dbhash))
+  {
+    print << "    EOXML";
+      <when value="$db">
+        <param name="output_format" type="select" label="Output Format">
+    EOXML
+
+    foreach my $eutils_format (sort {$efetch_dbhash->{$db}->{$a} cmp
+                                       $efetch_dbhash->{$db}->{$b}}
+                               keys(%{$efetch_dbhash->{$db}}))
+      {
+        print << "        EOXML";
+          <option value="$eutils_format">$efetch_dbhash->{$db}->{$eutils_format}</option>
+        EOXML
+      }
+
+    print << "    EOXML";
+        </param>
+      </when>
+    EOXML
+  }
+
+print << 'EOXML';
+    </conditional>
+  </xml>
+EOXML
+
+##
+## Create a select list for the databases linked *from*
+##
+
+print << 'EOXML';
+  <xml name="dbselect" token_name="db_select" token_label="NCBI Database to Query">
+    <param name="@NAME@" type="select" label="@LABEL@">
+EOXML
+
+foreach my $from (@sorted_dblist)
+  {
+    print << "    EOXML";
+      <option value="$from">$dbnames->{$from}</option>
+    EOXML
+  }
+
+print << 'EOXML';
+    </param>
+  </xml>
+EOXML
+
+##
+## Create a select list for the databases linked *to*
+##
+
+print << 'EOXML';
+  <xml name="dbselect_linked" token_name="db_select_linked" token_label="NCBI Database to Use">
+    <param name="@NAME@" type="select" label="@LABEL@">
+EOXML
+
+foreach my $from (grep {$dbfroms->{$_}} @sorted_dblist)
+  {
+    print << "    EOXML";
+      <option value="$from">$dbnames->{$from}</option>
+    EOXML
+  }
+
+print << 'EOXML';
+    </param>
+  </xml>
+EOXML
+
+##
+## Create empty entries for commands that take no *to* database or link
+##
+
+print << 'EOXML';
+  <xml name="none_link_macro">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database (n/a)">
+                <option value="n/a">Not applicable</option>
+              </param>
+              <when value="n/a">
+                <param name="linkname" type="select" label="Link Name (n/a)">
+                  <option value="n/a">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+  </xml>
+  <xml name="db_link_macro">
+        <conditional name="db_from_link">
+          <expand macro="dbselect_linked" name="db_select_from_link" label="From NCBI Database" />
+EOXML
+
+foreach(grep {$dbfroms->{$_}} @sorted_dblist)
+  {
+    print << "    EOXML";
+          <when value="$_">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+    EOXML
+  }
+
+print << 'EOXML';
+        </conditional>
+  </xml>
+EOXML
+
+##
+## This is the master macro for the command selection
+##
+
+print << 'EOXML';
+  <xml name="linkmacro">
+    <conditional name="cmd">
+      <param name="cmd_select" type="select" label="Link Method" help="Fetch UIDs from the 'To' Database that are linked to supplied UIDs in the 'From' database">
+        <option value="neighbor" selected="true">Neighbor (neighbor)</option>
+        <option value="neighbor_history">Neighbor, save result in history server (neighbor_history)</option>
+        <option value="neighbor_score">Neighbor Score (neighbor_score)</option>
+        <option value="acheck">Show available links to any database (acheck)</option>
+        <option value="ncheck">Show available links within the same database (ncheck)</option>
+        <option value="lcheck">Show available links to external sources (LinkOuts) (lcheck)</option>
+        <option value="llinks">Show available URLs and attributes for non-library LinkOut providers (llinks)</option>
+        <option value="llinkslib">Show available URLs and attributes for all LinkOut Providers (llinkslib)</option>
+        <option value="prlinks">Show available primary LinkOut Provider Links (prlinks)</option>
+      </param>
+      <when value="neighbor">
+        <expand macro="db_db_link_macro" name="link_select" label="Link name" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml">ID File (xml)</option>
+          <option value="json">ID File (json)</option>
+          <option value="text" selected="true">ID File (tabular)</option>
+        </param>
+      </when>
+      <when value="neighbor_history">
+        <expand macro="db_db_link_macro" name="link_select" label="Link name" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="json">History File (json)</option>
+          <option value="xml" selected="true">History File (xml)</option>
+        </param>
+      </when>
+      <when value="neighbor_score">
+        <expand macro="db_db_link_macro" name="link_select" label="Link name" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml">ID File (xml)</option>
+          <option value="json">ID File (json)</option>
+          <option value="text" selected="true">ID File (tabular)</option>
+        </param>
+      </when>
+      <when value="acheck">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="ncheck">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="lcheck">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="llinks">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="llinkslib">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="true">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="prlinks">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="true">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+    </conditional>
+  </xml>
+EOXML
+
+##
+## Create selections for valid links for command types neighbor, neighbor_history, and neighbor_score
+##
+
+print << 'EOXML';
+  <xml name="db_db_link_macro">
+        <conditional name="db_from_link">
+          <expand macro="dbselect_linked" name="db_select_from_link" label="From NCBI Database" />
+EOXML
+
+foreach my $from (grep {$dbfroms->{$_}} @sorted_dblist)
+  {
+    print STDERR ("Creating Links From: $from\n");
+
+    print << "    EOXML";
+          <when value="$from">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+    EOXML
+
+    my @dbtos = (grep {exists($h->{$from}) && exists($h->{$from}->{$_})}
+                 @sorted_dblist);
+    foreach(@dbtos)
+      {
+        print << "        EOXML";
+                <option value="$_">$dbnames->{$_}</option>
+        EOXML
+      }
+    if(scalar(@dbtos) == 0)
+      {
+        #Provide an option for a self-link: from->from
+        print << "        EOXML";
+                <option value="$from">$dbnames->{$from}</option>
+        EOXML
+      }
+
+    print << '    EOXML';
+              </param>
+    EOXML
+
+    if(exists($h->{$from}))
+      {
+        #There do exist links to invalid(/outdated/non-existant) databases that
+        #would result in an error if they are selected, so we use the original
+        #@dblist instead of the keys present in the sub hash of $h->{$from}, and
+        #then check for existence in the sub-hash
+        foreach my $to (grep {exists($h->{$from}->{$_})} @sorted_dblist)
+          {
+            print STDERR ("\tTo: $to Links: ",
+                          join(',',map {$_->[0]} @{$h->{$from}->{$to}}),
+                          "\n");
+
+            print << "            EOXML";
+              <when value="$to">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+            EOXML
+
+            foreach(sort {"$a->[1] ($a->[0])" cmp "$b->[1] ($b->[0])"}
+                    @{$h->{$from}->{$to}})
+              {
+                print << "                EOXML";
+                  <option value="$_->[0]">$_->[1] ($_->[0])</option>
+                EOXML
+              }
+
+            print << "            EOXML";
+                </param>
+              </when>
+            EOXML
+
+          }
+      }
+    else
+      {
+        ##
+        ## Add-on selections for self-links for command types neighbor,
+        ## neighbor_history, and neighbor_score
+        ## Note, I'm not sure this would yield a valid result from elink
+        ##
+
+        #This shows $from, but this is the 'when' for db_to conditional
+        print << "        EOXML";
+              <when value="$from">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">All Links</option>
+                </param>
+              </when>
+        EOXML
+      }
+
+    print << '    EOXML';
+            </conditional>
+          </when>
+    EOXML
+  }
+
+##
+## Add-on selections for self-links for command types neighbor,
+## neighbor_history, and neighbor_score
+## Note, I'm not sure this would yield a valid result from elink
+##
+
+foreach my $from (grep {!exists($h->{$_})} @sorted_dblist)
+  {
+    print << "EOXML";
+          <when value=\"$from\">
+            <conditional name=\"db_to\">
+              <param name=\"db_select_to\" type=\"select\" label=\"To NCBI Database\">
+                <option value=\"none\">Not applicable</option>
+              </param>
+              <when value=\"none\">
+                <param name=\"linkname\" type=\"select\" label=\"Link Name\">
+                  <option value=\"none\">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+EOXML
+  }
+
+##
+## This is the corresponding code for using the selections to add the respective command line options
+##
+
+print << 'EOXML';
+    </conditional>
+  </xml>
+EOXML
+
+print << 'EOXML';
+  <token name="@LINK_TOKEN@">
+    <![CDATA[
+#if $cmd.db_from_link.db_to.db_select_to == 'n/a':
+    none
+#else:
+    $cmd.db_from_link.db_to.db_select_to
+#end if
+
+$cmd.db_from_link.db_select_from_link
+
+$cmd.cmd_select
+
+#if $cmd.output_format == 'json':
+    --retmode json
+#elif $cmd.output_format == 'text':
+    --retmode uilist
+#else:
+    --retmode xml
+#end if
+
+#if $cmd.db_from_link.db_to.linkname != 'None' and $cmd.cmd_select in ('neighbor', 'neighbor_history', 'neighbor_score'):
+    --linkname $cmd.db_from_link.db_to.linkname
+#end if
+    ]]>
+  </token>
+EOXML
+
+sub startXML
+  {
+    print << '    EOXML';
+<?xml version="1.0"?>
+<macros>
+  <token name="@PROFILE@">18.01</token>
+  <token name="@WRAPPER_VERSION@">1.70</token>
+  <token name="@EMAIL_ARGUMENTS@">
+--user_email "$__user_email__"
+#set admin_emails = ';'.join(str($__admin_users__).split(','))
+--admin_email "$admin_emails"
+  </token>
+  <!--  TODO: citation -->
+  <token name="@REFERENCES@"><![CDATA[
+  ]]></token>
+  <token name="@DISCLAIMER@"><![CDATA[
+Usage Guidelines and Requirements
+=================================
+
+Frequency, Timing, and Registration of E-utility URL Requests
+-------------------------------------------------------------
+
+In order not to overload the E-utility servers, NCBI recommends that users
+limit large jobs to either weekends or between 9:00 PM and 5:00 AM Eastern time
+during weekdays. Failure to comply with this policy may result in an IP address
+being blocked from accessing NCBI.
+
+Minimizing the Number of Requests
+---------------------------------
+
+If a task requires searching for and/or downloading a large number of
+records, it is much more efficient to use the Entrez History to upload
+and/or retrieve these records in batches rather than using separate
+requests for each record. Please refer to Application 3 in Chapter 3
+for an example. Many thousands of IDs can be uploaded using a single
+EPost request, and several hundred records can be downloaded using one
+EFetch request.
+
+
+Disclaimer and Copyright Issues
+-------------------------------
+
+In accordance with requirements of NCBI's E-Utilities, we must provide
+the following disclaimer:
+
+Please note that abstracts in PubMed may incorporate material that may
+be protected by U.S. and foreign copyright laws. All persons
+reproducing, redistributing, or making commercial use of this
+information are expected to adhere to the terms and conditions asserted
+by the copyright holder. Transmission or reproduction of protected
+items beyond that allowed by fair use (PDF) as defined in the copyright
+laws requires the written permission of the copyright owners. NLM
+provides no legal advice concerning distribution of copyrighted
+materials. Please consult your legal counsel. If you wish to do a large
+data mining project on PubMed data, you can enter into a licensing
+agreement and lease the data for free from NLM. For more information on
+this please see `https://www.nlm.nih.gov/databases/download/data_distrib_main.html <https://www.nlm.nih.gov/databases/download/data_distrib_main.html>`__
+
+The `full disclaimer <https://www.ncbi.nlm.nih.gov/home/about/policies/>`__ is available on
+their website
+
+Liability
+~~~~~~~~~
+
+For documents and software available from this server, the
+U.S. Government does not warrant or assume any legal liability or
+responsibility for the accuracy, completeness, or usefulness of any
+information, apparatus, product, or process disclosed.
+
+Endorsement
+~~~~~~~~~~~
+
+NCBI does not endorse or recommend any commercial
+products, processes, or services. The views and opinions of authors
+expressed on NCBI's Web sites do not necessarily state or reflect those
+of the U.S. Government, and they may not be used for advertising or
+product endorsement purposes.
+
+External Links
+~~~~~~~~~~~~~~
+
+Some NCBI Web pages may provide links to other Internet
+sites for the convenience of users. NCBI is not responsible for the
+availability or content of these external sites, nor does NCBI endorse,
+warrant, or guarantee the products, services, or information described
+or offered at these other Internet sites. Users cannot assume that the
+external sites will abide by the same Privacy Policy to which NCBI
+adheres. It is the responsibility of the user to examine the copyright
+and licensing restrictions of linked pages and to secure all necessary
+permissions.
+        ]]></token>
+  <token name="@LIST_OR_HIST@">
+#if $query_source.qss == "history_json":
+    --history_file $query_source.history_file
+#else if $query_source.qss == "history_xml":
+    --history_xml $query_source.history_xml
+#else if $query_source.qss == "id_file":
+    --id_list $query_source.id_file
+#else if $query_source.qss == "id_list":
+    --id $query_source.id_list
+#else if $query_source.qss == "id_xml":
+    --id_xml $query_source.id_xml
+#else if $query_source.qss == "id_json":
+    --id_json $query_source.id_json
+#end if
+  </token>
+  <xml name="list_or_hist">
+    <conditional name="query_source">
+      <param name="qss" type="select" label="Enter Query IDs by..." help="Files output by ELink or ESearch are acceptable.  Query IDs in an ELink result are ignored.">
+        <option value="history_json">History File (JSON)</option>
+        <option value="history_xml">History File (XML)</option>
+        <option value="id_file" selected="True">ID file (Tabular)</option>
+        <option value="id_xml">ID File (XML)</option>
+        <option value="id_json">ID File (JSON)</option>
+        <option value="id_list">Paste IDs</option>
+      </param>
+      <when value="history_json">
+        <param label="History File (JSON)" name="history_file" type="data" format="json" help="A JSON file containing the WebEnv ID and Query Key referencing the search on the NCBI history server"/>
+      </when>
+      <when value="history_xml">
+        <param label="History File (XML)" name="history_xml" type="data" format="xml" help="An XML file containing the WebEnv ID and Query Key referencing the search on the NCBI history server"/>
+      </when>
+      <when value="id_file">
+        <param label="ID File (Text)" name="id_file" type="data" format="text,tabular" help="A Text file containing one ID per line"/>
+      </when>
+      <when value="id_xml">
+        <param label="ID File (XML)" name="id_xml" type="data" format="xml" help="ESearch or ELink Result XML file"/>
+      </when>
+      <when value="id_json">
+        <param label="ID File (JSON)" name="id_json" type="data" format="json" help="ESearch or ELink Result JSON file"/>
+      </when>
+      <when value="id_list">
+        <param label="Paste ID List" name="id_list" type="text" area="true" help="Newline/Comma separated list of IDs"/>
+      </when>
+    </conditional>
+  </xml>
+  <xml name="citations">
+    <citations>
+      <citation type="bibtex">@Book{ncbiEutils,
+          author = {Eric Sayers},
+          title = {Entrez Programming Utilities Help},
+          year = {2010},
+          publisher = {National Center for Biotechnology Information, Bethesda, Maryland},
+          note = {https://www.ncbi.nlm.nih.gov/books/NBK25500/}
+      }</citation>
+    </citations>
+  </xml>
+  <xml name="requirements">
+    <requirements>
+      <requirement type="package" version="1.70">biopython</requirement>
+    </requirements>
+  </xml>
+  <token name="@EFETCH_FORMAT_TOKEN@">
+    <![CDATA[
+
+    ## This token must go at the end of the efetch command
+
+    #set rettype, retmode, format = str($db.output_format).split('-')
+
+    #if retmode != "none":
+      --retmode $retmode
+    #end if
+    ## Otherwise, defaults to a None/empty which implies 'default' to NCBI
+
+    #if rettype != "none":
+        --rettype $rettype
+    #end if
+
+    --galaxy_format $format
+
+    ]]>
+  </token>
+    EOXML
+  }
+
+sub endXML
+  {
+    print << '    EOXML';
+</macros>
+    EOXML
+  }
+
+BEGIN {startXML()}
+END   {endXML()}
+
+
+##
+## Output formats for efetch mapped to galaxy formats
+##
+
+#Based on:
+#https://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.T._valid_values_of__retmode_and/?report=objectonly
+
+#Note: While json works for esearch and elink, the only database that supports
+#json (according to an NLM support ticket I have about this) is snp
+
+#The output_format param value for these will be "rettype-retmode-format"
+
+#db	galaxy	retmode	rettype	format_name
+__DATA__
+bioproject	tabular	text	uilist	List of UIDs
+bioproject	xml	xml	docsum	Document summary
+bioproject	xml	xml	uilist	List of UIDs
+bioproject	xml	xml	xml	Full record
+biosample	tabular	text	uilist	List of UIDs
+biosample	txt	text	full	Full record
+biosample	xml	xml	docsum	Document summary
+biosample	xml	xml	full	Full record
+biosample	xml	xml	uilist	List of UIDs
+biosystems	tabular	text	uilist	List of UIDs
+biosystems	xml	xml	docsum	Document summary
+biosystems	xml	xml	uilist	List of UIDs
+biosystems	xml	xml	xml	Full record
+clinvar	tabular	text	uilist	List of UIDs
+clinvar	xml	xml	clinvarset	ClinVar Set
+clinvar	xml	xml	docsum	Document summary
+clinvar	xml	xml	uilist	List of UIDs
+clinvar	xml	none	none	Full
+gds	tabular	text	uilist	List of UIDs
+gds	txt	text	summary	Summary
+gds	xml	xml	docsum	Document summary
+gds	xml	xml	uilist	List of UIDs
+gds	xml	none	none	Full
+gene	txt	text	gene_table	Gene table
+gene	tabular	text	uilist	List of UIDs
+gene	txt	asn.1	none	text ASN.1
+gene	xml	xml	docsum	Document summary
+gene	xml	xml	none	Full
+gene	xml	xml	uilist	List of UIDs
+gtr	tabular	text	uilist	List of UIDs
+gtr	xml	xml	docsum	Document summary
+gtr	xml	xml	gtracc	GTR Test Report
+gtr	xml	xml	uilist	List of UIDs
+gtr	xml	none	none	Full
+homologene	fasta	text	fasta	FASTA
+homologene	tabular	text	alignmentscores	Alignment scores
+homologene	tabular	text	uilist	List of UIDs
+homologene	txt	asn.1	none	text ASN.1
+homologene	txt	text	homologene	HomoloGene
+homologene	xml	xml	docsum	Document summary
+homologene	xml	xml	none	Full
+homologene	xml	xml	uilist	List of UIDs
+mesh	tabular	text	uilist	List of UIDs
+mesh	txt	text	full	Full record
+mesh	xml	xml	docsum	Document summary
+mesh	xml	xml	uilist	List of UIDs
+nlmcatalog	tabular	text	uilist	List of UIDs
+nlmcatalog	txt	text	none	Full record
+nlmcatalog	xml	xml	docsum	Document summary
+nlmcatalog	xml	xml	none	Full
+nlmcatalog	xml	xml	uilist	List of UIDs
+nuccore	binary	asn.1	none	binary ASN.1
+nuccore	fasta	text	fasta	FASTA
+nuccore	fasta	text	fasta_cds_aa	CDS protein FASTA
+nuccore	fasta	text	fasta_cds_na	CDS nucleotide FASTA
+nuccore	genbank	text	gb	GenBank flat file
+nuccore	genbank	text	gbwithparts	GenBank flat file with full sequence (contigs)
+nuccore	tabular	text	acc	Accession number(s)
+nuccore	txt	text	ft	Feature table
+nuccore	tabular	text	seqid	SeqID string
+nuccore	tabular	text	uilist	List of UIDs
+nuccore	txt	text	none	text ASN.1
+nuccore	xml	xml	docsum	Document summary
+nuccore	xml	xml	fasta	TinySeq
+nuccore	xml	xml	gb	GBSeq
+nuccore	xml	xml	gbc	INSDSeq
+nuccore	xml	xml	native	Full record
+nuccore	xml	xml	uilist	List of UIDs
+nucest	binary	asn.1	none	binary ASN.1
+nucest	fasta	text	fasta	FASTA
+nucest	genbank	text	gb	GenBank flat file
+nucest	tabular	text	acc	Accession number(s)
+nucest	tabular	text	seqid	SeqID string
+nucest	tabular	text	uilist	List of UIDs
+nucest	txt	text	est	EST report
+nucest	txt	text	none	text ASN.1
+nucest	xml	xml	docsum	Document summary
+nucest	xml	xml	fasta	TinySeq
+nucest	xml	xml	gb	GBSeq
+nucest	xml	xml	gbc	INSDSeq
+nucest	xml	xml	native	Full record
+nucest	xml	xml	uilist	List of UIDs
+nucgss	binary	asn.1	none	binary ASN.1
+nucgss	fasta	text	fasta	FASTA
+nucgss	genbank	text	gb	GenBank flat file
+nucgss	tabular	text	acc	Accession number(s)
+nucgss	tabular	text	seqid	SeqID string
+nucgss	tabular	text	uilist	List of UIDs
+nucgss	txt	text	gss	GSS report
+nucgss	txt	text	none	text ASN.1
+nucgss	xml	xml	docsum	Document summary
+nucgss	xml	xml	fasta	TinySeq
+nucgss	xml	xml	gb	GBSeq
+nucgss	xml	xml	gbc	INSDSeq
+nucgss	xml	xml	native	Full record
+nucgss	xml	xml	uilist	List of UIDs
+pmc	tabular	text	uilist	List of UIDs
+pmc	txt	text	medline	MEDLINE
+pmc	xml	xml	docsum	Document summary
+pmc	xml	xml	none	FULL
+pmc	xml	xml	uilist	List of UIDs
+popset	binary	asn.1	none	binary ASN.1
+popset	fasta	text	fasta	FASTA
+popset	genbank	text	gb	GenBank flat file
+popset	tabular	text	acc	Accession number(s)
+popset	tabular	text	seqid	SeqID string
+popset	tabular	text	uilist	List of UIDs
+popset	txt	text	none	text ASN.1
+popset	xml	xml	docsum	Document summary
+popset	xml	xml	fasta	TinySeq
+popset	xml	xml	gb	GBSeq
+popset	xml	xml	gbc	INSDSeq
+popset	xml	xml	native	Full record
+popset	xml	xml	uilist	List of UIDs
+protein	binary	asn.1	none	binary ASN.1
+protein	fasta	text	fasta	FASTA
+protein	tabular	text	acc	Accession number(s)
+protein	txt	text	ft	Feature table
+protein	tabular	text	seqid	SeqID string
+protein	tabular	text	uilist	List of UIDs
+protein	txt	text	gp	GenPept flat file
+protein	txt	text	none	text ASN.1
+protein	xml	xml	docsum	Document summary
+protein	xml	xml	fasta	TinySeq
+protein	xml	xml	gp	GBSeq
+protein	xml	xml	gpc	INSDSeq
+protein	xml	xml	ipg	Identical Protein
+protein	xml	xml	native	Full record
+protein	xml	xml	uilist	List of UIDs
+pubmed	tabular	text	uilist	List of UIDs
+pubmed	txt	asn.1	none	text ASN.1
+pubmed	txt	text	abstract	Abstract
+pubmed	txt	text	medline	MEDLINE
+pubmed	xml	xml	docsum	Document summary
+pubmed	xml	xml	none	Full
+pubmed	xml	xml	uilist	List of UIDs
+sequences	fasta	text	fasta	FASTA
+sequences	tabular	text	acc	Accession number(s)
+sequences	tabular	text	seqid	SeqID string
+sequences	tabular	text	uilist	List of UIDs
+sequences	txt	text	none	text ASN.1
+sequences	xml	xml	docsum	Document summary
+sequences	xml	xml	uilist	List of UIDs
+sequences	xml	none	none	Full
+snp	fasta	text	fasta	FASTA
+snp	json	json	docsum	Document summary
+snp	json	json	uilist	List of UIDs
+snp	tabular	text	ssexemplar	SS Exemplar list
+snp	tabular	text	uilist	List of UIDs
+snp	txt	asn.1	none	text ASN.1
+snp	txt	text	chr	Chromosome report
+snp	txt	text	docset	Summary
+snp	txt	text	flt	Flat file
+snp	txt	text	rsr	RS Cluster report
+snp	xml	xml	docsum	Document summary
+snp	xml	xml	none	XML
+snp	xml	xml	uilist	List of UIDs
+sra	tabular	text	uilist	List of UIDs
+sra	xml	xml	docsum	Document summary
+sra	xml	xml	full	Full
+taxonomy	tabular	text	uilist	List of UIDs
+taxonomy	xml	xml	none	Full
+taxonomy	xml	xml	docsum	Document summary
+taxonomy	xml	xml	uilist	List of UIDs
--- a/macros.xml	Wed Mar 11 04:02:33 2020 -0400
+++ b/macros.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <macros>
   <token name="@PROFILE@">18.01</token>
-  <token name="@WRAPPER_VERSION@">1.3</token>
+  <token name="@WRAPPER_VERSION@">1.70</token>
   <token name="@EMAIL_ARGUMENTS@">
 --user_email "$__user_email__"
 #set admin_emails = ';'.join(str($__admin_users__).split(','))
@@ -86,743 +86,51 @@
 and licensing restrictions of linked pages and to secure all necessary
 permissions.
         ]]></token>
-    <xml name="dbselect"
-        token_name="db_select"
-        token_label="NCBI Database to Use"
-        >
-    <param name="@NAME@" type="select" label="@LABEL@">
-      <option value="annotinfo">Annotation Information</option>
-      <option value="assembly">Assembly</option>
-      <option value="bioproject">BioProject</option>
-      <option value="biosample">BioSample</option>
-      <option value="biosystems">Biosystems</option>
-      <option value="blastdbinfo">Blast Database Information</option>
-      <option value="books">Books</option>
-      <option value="cdd">Conserved Domains</option>
-      <option value="clinvar">Clinical Variants</option>
-      <option value="clone">CLone</option>
-      <option value="dbvar">dbVar</option>
-      <option value="gap">dbGaP</option>
-      <option value="gapplus">gapplus</option>
-      <option value="gds">GEO Datasets</option>
-      <option value="gencoll">Gencoll</option>
-      <option value="gene">Gene</option>
-      <option value="genome">Genome</option>
-      <option value="geoprofiles">GEO Profiles</option>
-      <option value="grasp">grasp</option>
-      <option value="gtr">Genetic Testing Registry</option>
-      <option value="homologene">HomoloGene</option>
-      <option value="medgen">MedGen</option>
-      <option value="mesh">MeSH</option>
-      <option value="ncbisearch">NCBI Web Site</option>
-      <option value="nlmcatalog">NLM Catalog</option>
-      <option value="nuccore">Nuccore</option>
-      <option value="nucest">EST</option>
-      <option value="nucgss">GSS</option>
-      <option value="nucleotide">Nucleotide</option>
-      <option value="omim">OMIM</option>
-      <option value="orgtrack">Orgtrack</option>
-      <option value="pcassay">PubChem BioAssay</option>
-      <option value="pccompound">PubChem Compound</option>
-      <option value="pcsubstance">PubChem Substance</option>
-      <option value="pmc">PubMed Central</option>
-      <option value="popset">PopSet</option>
-      <option value="probe">Probe</option>
-      <option value="protein">Protein</option>
-      <option value="proteinclusters">Protein Clusters</option>
-      <option value="pubmed">PubMed</option>
-      <option value="pubmedhealth">PubMed Health</option>
-      <option value="seqannot">seqannot</option>
-      <option value="snp">SNP</option>
-      <option value="sra">SRA</option>
-      <option value="structure">Structure</option>
-      <option value="taxonomy">Taxonomy</option>
-      <option value="unigene">UniGene</option>
-    </param>
-  </xml>
-  <xml name="db">
-    <conditional name="db">
-      <expand macro="dbselect" />
-      <when value="annotinfo">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="assembly">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="bioproject">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-None">BioProject Report</option>
-          <option value="native-xml">RecordSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="biosample">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-None">BioSample Report</option>
-          <option value="native-xml">BioSampleSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="biosystems">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-xml">Sys-set (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="blastdbinfo">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="books">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="cdd">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="clinvar">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="clone">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="dbvar">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="gap">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="gapplus">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="gds">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-xml">RecordSet (xml)</option>
-          <option value="summary-text">Summary (text)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="gencoll">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="gene">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="gene_table-xml">Gene Table (xml)</option>
-          <option value="native-asn.1">Entrezgene (asn.1)</option>
-          <option value="native-text">Gene Report (text)</option>
-          <option value="native-xml">Entrezgene-Set (xml)</option>
-          <option value="tabular-tabular">Tabular Report (tabular)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="genome">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="geoprofiles">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="grasp">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="gtr">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="homologene">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="alignmentscores-text">Alignment Scores (text)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="fasta-fasta">FASTA (fasta)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="homologene-text">Homologene Report (text)</option>
-          <option value="native-asn.1">HG-Entry (asn.1)</option>
-          <option value="native-text">Homologene List (text)</option>
-          <option value="native-xml">Entrez-Homologene-Set (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="medgen">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="mesh">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-text">Full Record (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-text">MeSH Report (text)</option>
-          <option value="native-xml">RecordSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="ncbisearch">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="nlmcatalog">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-text">Full Record (text)</option>
-          <option value="native-xml">NLMCatalogRecordSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="nuccore">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="acc-text">Accession Number (text)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="est-xml">EST Report (xml)</option>
-          <option value="fasta-fasta">FASTA (fasta)</option>
-          <option value="fasta-xml">TinySeq (xml)</option>
-          <option value="fasta_cds_aa-fasta">CDS Products (fasta)</option>
-          <option value="fasta_cds_na-fasta">Coding Regions (fasta)</option>
-          <option value="ft-text">Feature Table (text)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="gb-text">GenBank Flatfile (text)</option>
-          <option value="gb-xml">GBSet (xml)</option>
-          <option value="gbc-xml">INSDSet (xml)</option>
-          <option value="gbwithparts-text">GenBank with Contig Sequences (text)</option>
-          <option value="gene_fasta-fasta">FASTA of Gene (fasta)</option>
-          <option value="gp-text">GenPept Flatfile (text)</option>
-          <option value="gp-xml">GBSet (xml)</option>
-          <option value="gpc-xml">INSDSet (xml)</option>
-          <option value="gss-text">GSS Report (text)</option>
-          <option value="ipg-text">Identical Protein Report (text)</option>
-          <option value="ipg-xml">IPGReportSet (xml)</option>
-          <option value="native-text">Seq-entry (text)</option>
-          <option value="native-xml">Bioseq-set (xml)</option>
-          <option value="seqid-asn.1">Seq-id (asn.1)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="nucest">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="acc-text">Accession Number (text)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="est-xml">EST Report (xml)</option>
-          <option value="fasta-fasta">FASTA (fasta)</option>
-          <option value="fasta-xml">TinySeq (xml)</option>
-          <option value="fasta_cds_aa-fasta">CDS Products (fasta)</option>
-          <option value="fasta_cds_na-fasta">Coding Regions (fasta)</option>
-          <option value="ft-text">Feature Table (text)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="gb-text">GenBank Flatfile (text)</option>
-          <option value="gb-xml">GBSet (xml)</option>
-          <option value="gbc-xml">INSDSet (xml)</option>
-          <option value="gbwithparts-text">GenBank with Contig Sequences (text)</option>
-          <option value="gene_fasta-fasta">FASTA of Gene (fasta)</option>
-          <option value="gp-text">GenPept Flatfile (text)</option>
-          <option value="gp-xml">GBSet (xml)</option>
-          <option value="gpc-xml">INSDSet (xml)</option>
-          <option value="gss-text">GSS Report (text)</option>
-          <option value="ipg-text">Identical Protein Report (text)</option>
-          <option value="ipg-xml">IPGReportSet (xml)</option>
-          <option value="native-text">Seq-entry (text)</option>
-          <option value="native-xml">Bioseq-set (xml)</option>
-          <option value="seqid-asn.1">Seq-id (asn.1)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="nucgss">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="acc-text">Accession Number (text)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="est-xml">EST Report (xml)</option>
-          <option value="fasta-fasta">FASTA (fasta)</option>
-          <option value="fasta-xml">TinySeq (xml)</option>
-          <option value="fasta_cds_aa-fasta">CDS Products (fasta)</option>
-          <option value="fasta_cds_na-fasta">Coding Regions (fasta)</option>
-          <option value="ft-text">Feature Table (text)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="gb-text">GenBank Flatfile (text)</option>
-          <option value="gb-xml">GBSet (xml)</option>
-          <option value="gbc-xml">INSDSet (xml)</option>
-          <option value="gbwithparts-text">GenBank with Contig Sequences (text)</option>
-          <option value="gene_fasta-fasta">FASTA of Gene (fasta)</option>
-          <option value="gp-text">GenPept Flatfile (text)</option>
-          <option value="gp-xml">GBSet (xml)</option>
-          <option value="gpc-xml">INSDSet (xml)</option>
-          <option value="gss-text">GSS Report (text)</option>
-          <option value="ipg-text">Identical Protein Report (text)</option>
-          <option value="ipg-xml">IPGReportSet (xml)</option>
-          <option value="native-text">Seq-entry (text)</option>
-          <option value="native-xml">Bioseq-set (xml)</option>
-          <option value="seqid-asn.1">Seq-id (asn.1)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="nucleotide">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="acc-text">Accession Number (text)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="est-xml">EST Report (xml)</option>
-          <option value="fasta-fasta">FASTA (fasta)</option>
-          <option value="fasta-xml">TinySeq (xml)</option>
-          <option value="fasta_cds_aa-fasta">CDS Products (fasta)</option>
-          <option value="fasta_cds_na-fasta">Coding Regions (fasta)</option>
-          <option value="ft-text">Feature Table (text)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="gb-text">GenBank Flatfile (text)</option>
-          <option value="gb-xml">GBSet (xml)</option>
-          <option value="gbc-xml">INSDSet (xml)</option>
-          <option value="gbwithparts-text">GenBank with Contig Sequences (text)</option>
-          <option value="gene_fasta-fasta">FASTA of Gene (fasta)</option>
-          <option value="gp-text">GenPept Flatfile (text)</option>
-          <option value="gp-xml">GBSet (xml)</option>
-          <option value="gpc-xml">INSDSet (xml)</option>
-          <option value="gss-text">GSS Report (text)</option>
-          <option value="ipg-text">Identical Protein Report (text)</option>
-          <option value="ipg-xml">IPGReportSet (xml)</option>
-          <option value="native-text">Seq-entry (text)</option>
-          <option value="native-xml">Bioseq-set (xml)</option>
-          <option value="seqid-asn.1">Seq-id (asn.1)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="omim">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="orgtrack">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="pcassay">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="pccompound">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="pcsubstance">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="pmc">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="medline-text">MEDLINE (text)</option>
-          <option value="native-xml">pmc-articleset (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="popset">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="probe">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="protein">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="proteinclusters">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="pubmed">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="abstract-xml">Abstract (xml)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="medline-text">MEDLINE (text)</option>
-          <option value="native-asn.1">Pubmed-entry (asn.1)</option>
-          <option value="native-xml">PubmedArticleSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="pubmedhealth">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="seqannot">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="snp">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="chr-text">Chromosome Report (text)</option>
-          <option value="docset-text">Summary (text)</option>
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="fasta-fasta">FASTA (fasta)</option>
-          <option value="flt-text">Flat File (text)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-asn.1">Rs (asn.1)</option>
-          <option value="native-xml">ExchangeSet (xml)</option>
-          <option value="rsr-tabular">RS Cluster Report (tabular)</option>
-          <option value="ssexemplar-text">SS Exemplar List (text)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="sra">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-xml">EXPERIMENT_PACKAGE_SET (xml)</option>
-          <option value="runinfo-xml">SraRunInfo (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="structure">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="mmdb-asn.1">Ncbi-mime-asn1 strucseq (asn.1)</option>
-          <option value="native-text">MMDB Report (text)</option>
-          <option value="native-xml">RecordSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="taxonomy">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="native-text">Taxonomy List (text)</option>
-          <option value="native-xml">TaxaSet (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-      <when value="unigene">
-        <param name="output_format" type="select" label="Output Format">
-          <option value="docsum-json">Document Summary (json)</option>
-          <option value="docsum-xml">Document Summary (xml)</option>
-          <option value="full-text">Full Document (text)</option>
-          <option value="full-xml">Full Document (xml)</option>
-          <option value="uilist-text">Unique Identifier List (text)</option>
-          <option value="uilist-xml">Unique Identifier List (xml)</option>
-        </param>
-      </when>
-    </conditional>
-  </xml>
-
-  <xml name="efetch_formats">
-    <change_format>
-      <when input="output_format" value="fasta_cds_na-fasta" format="fasta"/>
-      <when input="output_format" value="ipg-xml" format="xml"/>
-      <when input="output_format" value="gbc-xml" format="xml"/>
-      <when input="output_format" value="medline-text" format="text"/>
-      <when input="output_format" value="native-None" format="text"/>
-      <when input="output_format" value="mmdb-asn.1" format="asn1"/>
-      <when input="output_format" value="seqid-asn.1" format="asn1"/>
-      <when input="output_format" value="acc-text" format="text"/>
-      <when input="output_format" value="summary-text" format="text"/>
-      <when input="output_format" value="gene_fasta-fasta" format="fasta"/>
-      <when input="output_format" value="native-text" format="text"/>
-      <when input="output_format" value="gbwithparts-text" format="text"/>
-      <when input="output_format" value="gpc-xml" format="xml"/>
-      <when input="output_format" value="fasta_cds_aa-fasta" format="fasta"/>
-      <when input="output_format" value="gp-text" format="text"/>
-      <when input="output_format" value="gss-text" format="text"/>
-      <when input="output_format" value="ipg-text" format="text"/>
-      <when input="output_format" value="uilist-xml" format="xml"/>
-      <when input="output_format" value="docsum-xml" format="xml"/>
-      <when input="output_format" value="rsr-tabular" format="tabular"/>
-      <when input="output_format" value="uilist-text" format="text"/>
-      <when input="output_format" value="gb-text" format="text"/>
-      <when input="output_format" value="chr-text" format="text"/>
-      <when input="output_format" value="alignmentscores-text" format="text"/>
-      <when input="output_format" value="native-asn.1" format="asn1"/>
-      <when input="output_format" value="gp-xml" format="xml"/>
-      <when input="output_format" value="tabular-tabular" format="tabular"/>
-      <when input="output_format" value="ssexemplar-text" format="text"/>
-      <when input="output_format" value="docsum-json" format="json"/>
-      <when input="output_format" value="fasta-xml" format="xml"/>
-      <when input="output_format" value="runinfo-xml" format="xml"/>
-      <when input="output_format" value="flt-text" format="text"/>
-      <when input="output_format" value="fasta-fasta" format="fasta"/>
-      <when input="output_format" value="full-text" format="text"/>
-      <when input="output_format" value="gb-xml" format="xml"/>
-      <when input="output_format" value="abstract-xml" format="xml"/>
-      <when input="output_format" value="full-xml" format="xml"/>
-      <when input="output_format" value="ft-text" format="text"/>
-      <when input="output_format" value="homologene-text" format="text"/>
-      <when input="output_format" value="est-xml" format="xml"/>
-      <when input="output_format" value="gene_table-xml" format="xml"/>
-      <when input="output_format" value="docset-text" format="text"/>
-      <when input="output_format" value="native-xml" format="xml"/>
-    </change_format>
-  </xml>
   <token name="@LIST_OR_HIST@">
-#if $query_source.qss == "history":
+#if $query_source.qss == "history_json":
     --history_file $query_source.history_file
+#else if $query_source.qss == "history_xml":
+    --history_xml $query_source.history_xml
 #else if $query_source.qss == "id_file":
     --id_list $query_source.id_file
 #else if $query_source.qss == "id_list":
     --id $query_source.id_list
+#else if $query_source.qss == "id_xml":
+    --id_xml $query_source.id_xml
+#else if $query_source.qss == "id_json":
+    --id_json $query_source.id_json
 #end if
-    </token>
+  </token>
   <xml name="list_or_hist">
     <conditional name="query_source">
-      <param name="qss" type="select" label="Select source for IDs">
-        <option value="history">NCBI WebEnv History</option>
-        <option value="id_file">File containing IDs (one per line)</option>
-        <option value="id_list">Direct Entry</option>
+      <param name="qss" type="select" label="Enter Query IDs by..." help="Files output by ELink or ESearch are acceptable.  Query IDs in an ELink result are ignored.">
+        <option value="history_json">History File (JSON)</option>
+        <option value="history_xml">History File (XML)</option>
+        <option value="id_file" selected="True">ID file (Tabular)</option>
+        <option value="id_xml">ID File (XML)</option>
+        <option value="id_json">ID File (JSON)</option>
+        <option value="id_list">Paste IDs</option>
       </param>
-      <when value="history">
-        <param label="History File" name="history_file" type="data" format="json"/>
+      <when value="history_json">
+        <param label="History File (JSON)" name="history_file" type="data" format="json" help="A JSON file containing the WebEnv ID and Query Key referencing the search on the NCBI history server"/>
+      </when>
+      <when value="history_xml">
+        <param label="History File (XML)" name="history_xml" type="data" format="xml" help="An XML file containing the WebEnv ID and Query Key referencing the search on the NCBI history server"/>
       </when>
       <when value="id_file">
-        <param label="ID List" name="id_file" type="data" format="text,tabular"/>
+        <param label="ID File (Text)" name="id_file" type="data" format="text,tabular" help="A Text file containing one ID per line"/>
+      </when>
+      <when value="id_xml">
+        <param label="ID File (XML)" name="id_xml" type="data" format="xml" help="ESearch or ELink Result XML file"/>
+      </when>
+      <when value="id_json">
+        <param label="ID File (JSON)" name="id_json" type="data" format="json" help="ESearch or ELink Result JSON file"/>
       </when>
       <when value="id_list">
-        <param label="ID List" name="id_list" type="text" area="true" help="Newline/Comma separated list of IDs"/>
+        <param label="Paste ID List" name="id_list" type="text" area="true" help="Newline/Comma separated list of IDs"/>
       </when>
     </conditional>
   </xml>
-  <xml name="history_out">
-    <data format="json" name="history" label="NCBI Entrez WebEnv History">
-      <yield/>
-    </data>
-  </xml>
   <xml name="citations">
     <citations>
       <citation type="bibtex">@Book{ncbiEutils,
@@ -836,12 +144,4400 @@
   </xml>
   <xml name="requirements">
     <requirements>
+      <requirement type="package" version="3">python</requirement>
       <requirement type="package" version="1.70">biopython</requirement>
     </requirements>
   </xml>
-  <xml name="linkname">
-    <param name="linkname" type="select" label="To NCBI Database">
-        <!-- TODO: https://eutils.ncbi.nlm.nih.gov/entrez/query/static/entrezlinks.html -->
+  <token name="@EFETCH_FORMAT_TOKEN@">
+    <![CDATA[
+
+    ## This token must go at the end of the efetch command
+
+    #set rettype, retmode, format = str($db.output_format).split('-')
+
+    #if retmode != "none":
+      --retmode $retmode
+    #end if
+    ## Otherwise, defaults to a None/empty which implies 'default' to NCBI
+
+    #if rettype != "none":
+        --rettype $rettype
+    #end if
+
+    --galaxy_format $format
+
+    ]]>
+  </token>
+  <xml name="dbselect_efetch" token_name="db_select" token_label="NCBI Database to Query">
+    <param name="@NAME@" type="select" label="@LABEL@">
+      <option value="bioproject">BioProject (bioproject)</option>
+      <option value="biosample">BioSample (biosample)</option>
+      <option value="biosystems">BioSystems (biosystems)</option>
+      <option value="clinvar">ClinVar (clinvar)</option>
+      <option value="gds">GEO DataSets (gds)</option>
+      <option value="gtr">GTR (gtr)</option>
+      <option value="gene">Gene (gene)</option>
+      <option value="homologene">HomoloGene (homologene)</option>
+      <option value="mesh">MeSH (mesh)</option>
+      <option value="nlmcatalog">NLM Catalog (nlmcatalog)</option>
+      <option value="nuccore">Nucleotide (nuccore)</option>
+      <option value="pmc">PMC (pmc)</option>
+      <option value="popset">PopSet (popset)</option>
+      <option value="protein">Protein (protein)</option>
+      <option value="pubmed" selected="True">PubMed (pubmed)</option>
+      <option value="snp">SNP (snp)</option>
+      <option value="sra">SRA (sra)</option>
+      <option value="taxonomy">Taxonomy (taxonomy)</option>
+    </param>
+  </xml>
+  <xml name="efetchdb">
+    <conditional name="db">
+      <expand macro="dbselect_efetch" />
+      <when value="bioproject">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="xml-xml-xml">Full record (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="biosample">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="full-text-txt">Full record (txt)</option>
+          <option value="full-xml-xml">Full record (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="biosystems">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="xml-xml-xml">Full record (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="clinvar">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="clinvarset-xml-xml">ClinVar Set (xml)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-none-xml">Full (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="gds">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-none-xml">Full (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="summary-text-txt">Summary (txt)</option>
+        </param>
+      </when>
+      <when value="gtr">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-none-xml">Full (xml)</option>
+          <option value="gtracc-xml-xml">GTR Test Report (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="gene">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-xml-xml">Full (xml)</option>
+          <option value="gene_table-text-txt">Gene table (txt)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="none-asn.1-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="homologene">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="alignmentscores-text-tabular">Alignment scores (tabular)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="fasta-text-fasta">FASTA (fasta)</option>
+          <option value="none-xml-xml">Full (xml)</option>
+          <option value="homologene-text-txt">HomoloGene (txt)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="none-asn.1-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="mesh">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="full-text-txt">Full record (txt)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="nlmcatalog">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-xml-xml">Full (xml)</option>
+          <option value="none-text-txt">Full record (txt)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+      <when value="nuccore">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="acc-text-tabular">Accession number(s) (tabular)</option>
+          <option value="fasta_cds_na-text-fasta">CDS nucleotide FASTA (fasta)</option>
+          <option value="fasta_cds_aa-text-fasta">CDS protein FASTA (fasta)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="fasta-text-fasta">FASTA (fasta)</option>
+          <option value="ft-text-txt">Feature table (txt)</option>
+          <option value="native-xml-xml">Full record (xml)</option>
+          <option value="gb-xml-xml">GBSeq (xml)</option>
+          <option value="gb-text-genbank">GenBank flat file (genbank)</option>
+          <option value="gbwithparts-text-genbank">GenBank flat file with full sequence (contigs) (genbank)</option>
+          <option value="gbc-xml-xml">INSDSeq (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="seqid-text-tabular">SeqID string (tabular)</option>
+          <option value="fasta-xml-xml">TinySeq (xml)</option>
+          <option value="none-asn.1-binary">binary ASN.1 (binary)</option>
+          <option value="none-text-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="pmc">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-xml-xml">FULL (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="medline-text-txt">MEDLINE (txt)</option>
+        </param>
+      </when>
+      <when value="popset">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="acc-text-tabular">Accession number(s) (tabular)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="fasta-text-fasta">FASTA (fasta)</option>
+          <option value="native-xml-xml">Full record (xml)</option>
+          <option value="gb-xml-xml">GBSeq (xml)</option>
+          <option value="gb-text-genbank">GenBank flat file (genbank)</option>
+          <option value="gbc-xml-xml">INSDSeq (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="seqid-text-tabular">SeqID string (tabular)</option>
+          <option value="fasta-xml-xml">TinySeq (xml)</option>
+          <option value="none-asn.1-binary">binary ASN.1 (binary)</option>
+          <option value="none-text-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="protein">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="acc-text-tabular">Accession number(s) (tabular)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="fasta-text-fasta">FASTA (fasta)</option>
+          <option value="ft-text-txt">Feature table (txt)</option>
+          <option value="native-xml-xml">Full record (xml)</option>
+          <option value="gp-xml-xml">GBSeq (xml)</option>
+          <option value="gp-text-txt">GenPept flat file (txt)</option>
+          <option value="gpc-xml-xml">INSDSeq (xml)</option>
+          <option value="ipg-xml-xml">Identical Protein (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="seqid-text-tabular">SeqID string (tabular)</option>
+          <option value="fasta-xml-xml">TinySeq (xml)</option>
+          <option value="none-asn.1-binary">binary ASN.1 (binary)</option>
+          <option value="none-text-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="pubmed">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="abstract-text-txt">Abstract (txt)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-xml-xml">Full (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="medline-text-txt">MEDLINE (txt)</option>
+          <option value="none-asn.1-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="snp">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="chr-text-txt">Chromosome report (txt)</option>
+          <option value="docsum-json-json">Document summary (json)</option>
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="fasta-text-fasta">FASTA (fasta)</option>
+          <option value="flt-text-txt">Flat file (txt)</option>
+          <option value="uilist-json-json">List of UIDs (json)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+          <option value="rsr-text-txt">RS Cluster report (txt)</option>
+          <option value="ssexemplar-text-tabular">SS Exemplar list (tabular)</option>
+          <option value="docset-text-txt">Summary (txt)</option>
+          <option value="none-xml-xml">XML (xml)</option>
+          <option value="none-asn.1-txt">text ASN.1 (txt)</option>
+        </param>
+      </when>
+      <when value="sra">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="full-xml-xml">Full (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+        </param>
+      </when>
+      <when value="taxonomy">
+        <param name="output_format" type="select" label="Output Format">
+          <option value="docsum-xml-xml">Document summary (xml)</option>
+          <option value="none-xml-xml">Full (xml)</option>
+          <option value="uilist-text-tabular">List of UIDs (tabular)</option>
+          <option value="uilist-xml-xml">List of UIDs (xml)</option>
+        </param>
+      </when>
+    </conditional>
+  </xml>
+  <xml name="dbselect" token_name="db_select" token_label="NCBI Database to Query">
+    <param name="@NAME@" type="select" label="@LABEL@">
+      <option value="annotinfo">AnnotInfo (annotinfo)</option>
+      <option value="assembly">Assembly (assembly)</option>
+      <option value="bioproject">BioProject (bioproject)</option>
+      <option value="biosample">BioSample (biosample)</option>
+      <option value="biosystems">BioSystems (biosystems)</option>
+      <option value="biocollections">Biocollections (biocollections)</option>
+      <option value="blastdbinfo">BlastdbInfo (blastdbinfo)</option>
+      <option value="books">Books (books)</option>
+      <option value="clinvar">ClinVar (clinvar)</option>
+      <option value="cdd">Conserved Domains (cdd)</option>
+      <option value="gds">GEO DataSets (gds)</option>
+      <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+      <option value="gtr">GTR (gtr)</option>
+      <option value="gapplus">GaPPlus (gapplus)</option>
+      <option value="gene">Gene (gene)</option>
+      <option value="genome">Genome (genome)</option>
+      <option value="homologene">HomoloGene (homologene)</option>
+      <option value="ipg">Identical Protein Groups (ipg)</option>
+      <option value="mesh">MeSH (mesh)</option>
+      <option value="medgen">MedGen (medgen)</option>
+      <option value="ncbisearch">NCBI Web Site (ncbisearch)</option>
+      <option value="nlmcatalog">NLM Catalog (nlmcatalog)</option>
+      <option value="nuccore">Nucleotide (nuccore)</option>
+      <option value="nucleotide">Nucleotide (nucleotide)</option>
+      <option value="omim">OMIM (omim)</option>
+      <option value="orgtrack">Orgtrack (orgtrack)</option>
+      <option value="pmc">PMC (pmc)</option>
+      <option value="popset">PopSet (popset)</option>
+      <option value="protein">Protein (protein)</option>
+      <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+      <option value="pcassay">PubChem BioAssay (pcassay)</option>
+      <option value="pccompound">PubChem Compound (pccompound)</option>
+      <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+      <option value="pubmed">PubMed (pubmed)</option>
+      <option value="snp">SNP (snp)</option>
+      <option value="sra">SRA (sra)</option>
+      <option value="seqannot">SeqAnnot (seqannot)</option>
+      <option value="sparcle">Sparcle (sparcle)</option>
+      <option value="structure">Structure (structure)</option>
+      <option value="taxonomy">Taxonomy (taxonomy)</option>
+      <option value="gap">dbGaP (gap)</option>
+      <option value="dbvar">dbVar (dbvar)</option>
+      <option value="grasp">grasp (grasp)</option>
+    </param>
+  </xml>
+  <xml name="dbselect_linked" token_name="db_select_linked" token_label="NCBI Database to Use">
+    <param name="@NAME@" type="select" label="@LABEL@">
+      <option value="annotinfo">AnnotInfo (annotinfo)</option>
+      <option value="assembly">Assembly (assembly)</option>
+      <option value="bioproject">BioProject (bioproject)</option>
+      <option value="biosample">BioSample (biosample)</option>
+      <option value="biosystems">BioSystems (biosystems)</option>
+      <option value="biocollections">Biocollections (biocollections)</option>
+      <option value="blastdbinfo">BlastdbInfo (blastdbinfo)</option>
+      <option value="books">Books (books)</option>
+      <option value="clinvar">ClinVar (clinvar)</option>
+      <option value="cdd">Conserved Domains (cdd)</option>
+      <option value="gds">GEO DataSets (gds)</option>
+      <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+      <option value="gtr">GTR (gtr)</option>
+      <option value="gapplus">GaPPlus (gapplus)</option>
+      <option value="gene">Gene (gene)</option>
+      <option value="genome">Genome (genome)</option>
+      <option value="homologene">HomoloGene (homologene)</option>
+      <option value="ipg">Identical Protein Groups (ipg)</option>
+      <option value="mesh">MeSH (mesh)</option>
+      <option value="medgen">MedGen (medgen)</option>
+      <option value="ncbisearch">NCBI Web Site (ncbisearch)</option>
+      <option value="nlmcatalog">NLM Catalog (nlmcatalog)</option>
+      <option value="nuccore">Nucleotide (nuccore)</option>
+      <option value="nucleotide">Nucleotide (nucleotide)</option>
+      <option value="omim">OMIM (omim)</option>
+      <option value="orgtrack">Orgtrack (orgtrack)</option>
+      <option value="pmc">PMC (pmc)</option>
+      <option value="popset">PopSet (popset)</option>
+      <option value="protein">Protein (protein)</option>
+      <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+      <option value="pcassay">PubChem BioAssay (pcassay)</option>
+      <option value="pccompound">PubChem Compound (pccompound)</option>
+      <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+      <option value="pubmed">PubMed (pubmed)</option>
+      <option value="snp">SNP (snp)</option>
+      <option value="sra">SRA (sra)</option>
+      <option value="seqannot">SeqAnnot (seqannot)</option>
+      <option value="sparcle">Sparcle (sparcle)</option>
+      <option value="structure">Structure (structure)</option>
+      <option value="taxonomy">Taxonomy (taxonomy)</option>
+      <option value="gap">dbGaP (gap)</option>
+      <option value="dbvar">dbVar (dbvar)</option>
+      <option value="grasp">grasp (grasp)</option>
     </param>
   </xml>
+  <xml name="none_link_macro">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database (n/a)">
+                <option value="n/a">Not applicable</option>
+              </param>
+              <when value="n/a">
+                <param name="linkname" type="select" label="Link Name (n/a)">
+                  <option value="n/a">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+  </xml>
+  <xml name="db_link_macro">
+        <conditional name="db_from_link">
+          <expand macro="dbselect_linked" name="db_select_from_link" label="From NCBI Database" />
+          <when value="annotinfo">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="assembly">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="bioproject">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="biosample">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="biosystems">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="biocollections">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="blastdbinfo">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="books">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="clinvar">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="cdd">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="gds">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="geoprofiles">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="gtr">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="gapplus">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="gene">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="genome">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="homologene">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="ipg">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="mesh">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="medgen">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="ncbisearch">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="nlmcatalog">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="nuccore">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="nucleotide">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="omim">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="orgtrack">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="pmc">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="popset">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="protein">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="proteinclusters">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="pcassay">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="pccompound">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="pcsubstance">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="pubmed">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="snp">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="sra">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="seqannot">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="sparcle">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="structure">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="taxonomy">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="gap">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="dbvar">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+          <when value="grasp">
+            <expand macro="none_link_macro" name="db_select_none" label="To NCBI Database" />
+          </when>
+        </conditional>
+  </xml>
+  <xml name="linkmacro">
+    <conditional name="cmd">
+      <param name="cmd_select" type="select" label="Link Method" help="Fetch UIDs from the 'To' Database that are linked to supplied UIDs in the 'From' database">
+        <option value="neighbor" selected="true">Neighbor (neighbor)</option>
+        <option value="neighbor_history">Neighbor, save result in history server (neighbor_history)</option>
+        <option value="neighbor_score">Neighbor Score (neighbor_score)</option>
+        <option value="acheck">Show available links to any database (acheck)</option>
+        <option value="ncheck">Show available links within the same database (ncheck)</option>
+        <option value="lcheck">Show available links to external sources (LinkOuts) (lcheck)</option>
+        <option value="llinks">Show available URLs and attributes for non-library LinkOut providers (llinks)</option>
+        <option value="llinkslib">Show available URLs and attributes for all LinkOut Providers (llinkslib)</option>
+        <option value="prlinks">Show available primary LinkOut Provider Links (prlinks)</option>
+      </param>
+      <when value="neighbor">
+        <expand macro="db_db_link_macro" name="link_select" label="Link name" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml">ID File (xml)</option>
+          <option value="json">ID File (json)</option>
+          <option value="text" selected="true">ID File (tabular)</option>
+        </param>
+      </when>
+      <when value="neighbor_history">
+        <expand macro="db_db_link_macro" name="link_select" label="Link name" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="json">History File (json)</option>
+          <option value="xml" selected="true">History File (xml)</option>
+        </param>
+      </when>
+      <when value="neighbor_score">
+        <expand macro="db_db_link_macro" name="link_select" label="Link name" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml">ID File (xml)</option>
+          <option value="json">ID File (json)</option>
+          <option value="text" selected="true">ID File (tabular)</option>
+        </param>
+      </when>
+      <when value="acheck">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="ncheck">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="lcheck">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="llinks">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="True">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="llinkslib">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="true">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+      <when value="prlinks">
+        <expand macro="db_link_macro" name="db_select_from_link" label="From NCBI Database" />
+        <param name="output_format" type="select" label="Output Format">
+          <option value="xml" selected="true">Link Description File (xml)</option>
+          <option value="json">Link Description File (json)</option>
+        </param>
+      </when>
+    </conditional>
+  </xml>
+  <xml name="db_db_link_macro">
+        <conditional name="db_from_link">
+          <expand macro="dbselect_linked" name="db_select_from_link" label="From NCBI Database" />
+          <when value="annotinfo">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="annotinfo">AnnotInfo (annotinfo)</option>
+              </param>
+              <when value="annotinfo">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">All Links</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="assembly">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_assembly_diploid">Linked assembly from diploid (assembly_assembly_diploid)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_bioproject">BioProject (assembly_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_biosample">BioSample (assembly_biosample)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_genome">Genome (assembly_genome)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_nuccore_insdc">Nucleotide INSDC (assembly_nuccore_insdc)</option>
+                  <option value="assembly_nuccore_refseq">Nucleotide RefSeq (assembly_nuccore_refseq)</option>
+                  <option value="assembly_nuccore_wgsmaster">WGS Master (assembly_nuccore_wgsmaster)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_pubmed">PubMed (assembly_pubmed)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_sra">Sra Links (assembly_sra)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="assembly_taxonomy">Taxonomy (assembly_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="bioproject">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_assembly_all">Assembly Links (bioproject_assembly_all)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_bioproject">BioProject (bioproject_bioproject)</option>
+                  <option value="bioproject_bioproject_u2d">Data projects (bioproject_bioproject_u2d)</option>
+                  <option value="bioproject_bioproject_d2u">Umbrella projects (bioproject_bioproject_d2u)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_biosample_all">BioSample Links (bioproject_biosample_all)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_gds">GEO DataSet Links (bioproject_gds)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_gene">Related Genes (bioproject_gene)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_genome">Genome Links (bioproject_genome)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_nuccore_genomic_dna">Genomic DNA (bioproject_nuccore_genomic_dna)</option>
+                  <option value="bioproject_nuccore_genomic_rna">Genomic RNA (bioproject_nuccore_genomic_rna)</option>
+                  <option value="bioproject_nuccore_map">Map Records (bioproject_nuccore_map)</option>
+                  <option value="bioproject_nuccore">Nucleotide Links (bioproject_nuccore)</option>
+                  <option value="bioproject_nuccore_reference">Reference Genome Sequences Links (bioproject_nuccore_reference)</option>
+                  <option value="bioproject_nuccore_repr">Representative Genome Sequences Links (bioproject_nuccore_repr)</option>
+                  <option value="bioproject_nuccore_tsamaster">TSA master (bioproject_nuccore_tsamaster)</option>
+                  <option value="bioproject_nuccore_transcript">Transcript (bioproject_nuccore_transcript)</option>
+                  <option value="bioproject_nuccore_wgsmaster">WGS master (bioproject_nuccore_wgsmaster)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_pmc">PMC Links (bioproject_pmc)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_popset">PopSet Links (bioproject_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_protein">Protein Links (bioproject_protein)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_pubmed">PubMed Links (bioproject_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_snp">SNP Links (bioproject_snp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_sra_all">SRA Links (bioproject_sra_all)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_taxonomy">Taxonomy Links (bioproject_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_gap">dbGaP Links (bioproject_gap)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="bioproject_dbvar">dbVar (bioproject_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="biosample">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biocollections">Biocollections (biocollections)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_assembly">Assembly links (biosample_assembly)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_bioproject">BioProject Links (biosample_bioproject)</option>
+                </param>
+              </when>
+              <when value="biocollections">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_biocollections">BioCollections (biosample_biocollections)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_gds">GEO DataSets Links (biosample_gds)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_nuccore">Nucleotide Links (biosample_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_omim">OMIM links (biosample_omim)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_pubmed">PubMed Links (biosample_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_snp">SNP Links (biosample_snp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_sra">SRA Links (biosample_sra)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_taxonomy">Taxonomy Links (biosample_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_gap">dbGaP Links (biosample_gap)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosample_dbvar">dbVar Links (biosample_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="biosystems">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_biosystems_conserved">Conserved BioSystems (biosystems_biosystems_conserved)</option>
+                  <option value="biosystems_biosystems_linked">Linked BioSystems (biosystems_biosystems_linked)</option>
+                  <option value="biosystems_biosystems_specific">Organism Specific BioSystems (biosystems_biosystems_specific)</option>
+                  <option value="biosystems_biosystems_similar">Similar BioSystems (biosystems_biosystems_similar)</option>
+                  <option value="biosystems_biosystems_sub">Subset BioSystems (biosystems_biosystems_sub)</option>
+                  <option value="biosystems_biosystems_super">Superset BioSystems (biosystems_biosystems_super)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_cdd_specific">Conserved Domains (biosystems_cdd_specific)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_geoprofiles_gene">Gene Expression (biosystems_geoprofiles_gene)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_gene_all">Gene (all) (biosystems_gene_all)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_homologene">Homologene (biosystems_homologene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_medgen_gene_diseases">Medical genetics (biosystems_medgen_gene_diseases)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_nuccore">Nucleotides (biosystems_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_omim">OMIM (biosystems_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_pmc_pubmed">Full text in PMC (biosystems_pmc_pubmed)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_protein">Proteins (biosystems_protein)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_proteinclusters">Protein Clusters (biosystems_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_pccompound">PubChem Compounds (biosystems_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_pcsubstance">PubChem Substances (biosystems_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_pubmed">PubMed (biosystems_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_sparcle">Functional Class (biosystems_sparcle)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_structure">Structures (biosystems_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_taxonomy">Taxonomy (biosystems_taxonomy)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biosystems_dbvar_gene">dbVar (biosystems_dbvar_gene)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="biocollections">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+              </param>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biocollections_biosample">BioSample (biocollections_biosample)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biocollections_nuccore">Nucleotide (biocollections_nuccore)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biocollections_popset">PopSet (biocollections_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="biocollections_protein">Protein (biocollections_protein)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="blastdbinfo">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="blastdbinfo_bioproject">BioProject Links (blastdbinfo_bioproject)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="blastdbinfo_pubmed">Pubmed Links (blastdbinfo_pubmed)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="blastdbinfo_taxonomy">Taxonomy Links (blastdbinfo_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="books">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="gene">Gene (gene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nlmcatalog">NLM Catalog (nlmcatalog)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_gene">Gene Links (books_gene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_medgen">MedGen (books_medgen)</option>
+                </param>
+              </when>
+              <when value="nlmcatalog">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_nlmcatalog">NLM Catalog Links (books_nlmcatalog)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_omim">OMIM Links (books_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_pmc_refs">PMC Links (books_pmc_refs)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_pcassay_probe">PubChem BioAssay for Chemical Probe (books_pcassay_probe)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_pcsubstance">PubChem Substance (books_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_pubmed_refs">PubMed Links (books_pubmed_refs)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="books_taxonomy">Taxonomy Links (books_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="clinvar">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="gtr">GTR (gtr)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="orgtrack">Orgtrack (orgtrack)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="gtr">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_gtr">GTR (all) (clinvar_gtr)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_gene">Gene (clinvar_gene)</option>
+                  <option value="clinvar_gene_specific">Related genes (specific) (clinvar_gene_specific)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_medgen">MedGen (clinvar_medgen)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_omim">OMIM (clinvar_omim)</option>
+                </param>
+              </when>
+              <when value="orgtrack">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_orgtrack">Orgtrack (all) (clinvar_orgtrack)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_pmc">PMC (clinvar_pmc)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_pubmed_calculated">PubMed (calculated) (clinvar_pubmed_calculated)</option>
+                  <option value="clinvar_pubmed">PubMed (clinvar_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_snp">dbSNP (clinvar_snp)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_sparcle">Functional Class (clinvar_sparcle)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="clinvar_dbvar">dbVar (clinvar_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="cdd">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_biosystems_specific">BioSystems (cdd_biosystems_specific)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_cdd_superfamily_2">Superfamily Links (cdd_cdd_superfamily_2)</option>
+                  <option value="cdd_cdd_related">Superfamily Member Links (cdd_cdd_related)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_gene">Gene Links (cdd_gene)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_homologene">HomoloGene  Links (cdd_homologene)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_pmc">PMC Links (cdd_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_protein_summary"> (cdd_protein_summary)</option>
+                  <option value="cdd_protein">Protein Links (cdd_protein)</option>
+                  <option value="cdd_protein_specific_2">Specific Protein Links (cdd_protein_specific_2)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_pcassay_protein_target">BioAssay via Protein Target (cdd_pcassay_protein_target)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_pubmed">PubMed Links (cdd_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_sparcle">Functional Class (cdd_sparcle)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_structure_family_2">Family Structure Links (cdd_structure_family_2)</option>
+                  <option value="cdd_structure">Structure Links (cdd_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="cdd_taxonomy">Taxonomy Links (cdd_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="gds">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_bioproject">BioProject Links (gds_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_biosample">BioSample links (gds_biosample)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_gds">Related DataSets (gds_gds)</option>
+                  <option value="gds_gds_similar">Similar studies (gds_gds_similar)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_geoprofiles">GEO Profiles (gds_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_pmc">PMC Links (gds_pmc)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_pubmed">PubMed Links (gds_pubmed)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_sra">SRA Links (gds_sra)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_taxonomy">Taxonomy Links (gds_taxonomy)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gds_dbvar">dbVar Links (gds_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="geoprofiles">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_biosystems_gene">Pathways + GO (geoprofiles_biosystems_gene)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_gds">Related DataSets (geoprofiles_gds)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_geoprofiles_chr">Chromosome neighbors (geoprofiles_geoprofiles_chr)</option>
+                  <option value="geoprofiles_geoprofiles_homologs">Homologene neighbors (geoprofiles_geoprofiles_homologs)</option>
+                  <option value="geoprofiles_geoprofiles_prof">Profile neighbors (geoprofiles_geoprofiles_prof)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_gene">Gene Links (geoprofiles_gene)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_homologene">HomoloGene Links (geoprofiles_homologene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_nuccore">Nucleotide Links (geoprofiles_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_omim">OMIM Links (geoprofiles_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_pmc">PMC Links (geoprofiles_pmc)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_pubmed">PubMed Links (geoprofiles_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_sparcle">Functional Class (geoprofiles_sparcle)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="geoprofiles_taxonomy">Taxonomy Links (geoprofiles_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="gtr">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="gene">Gene (gene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="orgtrack">Orgtrack (orgtrack)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+              </param>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gtr_gene">Gene (all) (gtr_gene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gtr_medgen">MedGen (gtr_medgen)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gtr_omim">OMIM (gtr_omim)</option>
+                </param>
+              </when>
+              <when value="orgtrack">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gtr_orgtrack">Orgtrack (gtr_orgtrack)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gtr_sparcle">Functional Class (gtr_sparcle)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="gapplus">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="gapplus">GaPPlus (gapplus)</option>
+              </param>
+              <when value="gapplus">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">All Links</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="gene">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gtr">GTR (gtr)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="nucleotide">Nucleotide (nucleotide)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_bioproject">BioProjects (gene_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_biosystems">BioSystem Links (gene_biosystems)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_books">Books Links (gene_books)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_clinvar">ClinVar (gene_clinvar)</option>
+                  <option value="gene_clinvar_specific">Related gene-specific medical variations (gene_clinvar_specific)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_cdd">Conserved Domain Links (gene_cdd)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_geoprofiles">GEO Profile Links (gene_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gtr">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_gtr">GTR (gene_gtr)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_gene_neighbors">Gene neighbors (gene_gene_neighbors)</option>
+                  <option value="gene_gene_h3k4me3">Genes with a similar H3K4me3 profile (gene_gene_h3k4me3)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_genome">Genome Links (gene_genome)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_homologene">HomoloGene Links (gene_homologene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_medgen_diseases">MedGen (gene_medgen_diseases)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_nuccore">Nucleotide Links (gene_nuccore)</option>
+                  <option value="gene_nuccore_mgc">Nucleotide NIH cDNA clone links (gene_nuccore_mgc)</option>
+                  <option value="gene_nuccore_refseqrna">RefSeq RNA Links (gene_nuccore_refseqrna)</option>
+                  <option value="gene_nuccore_refseqgene">RefSeqGene Links (gene_nuccore_refseqgene)</option>
+                </param>
+              </when>
+              <when value="nucleotide">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_nucleotide_mgc_url"> (gene_nucleotide_mgc_url)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_omim">OMIM Links (gene_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_pmc_nucleotide">Full text in PMC (nucleotide) (gene_pmc_nucleotide)</option>
+                  <option value="gene_pmc">PMC Links (gene_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_protein">Protein Links (gene_protein)</option>
+                  <option value="gene_protein_refseq">RefSeq Protein Links (gene_protein_refseq)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_proteinclusters">Protein Cluster Links (gene_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_pcassay_alltarget_list">BioAssay by Target (List) (gene_pcassay_alltarget_list)</option>
+                  <option value="gene_pcassay_alltarget_summary">BioAssay by Target (Summary) (gene_pcassay_alltarget_summary)</option>
+                  <option value="gene_pcassay_target">BioAssay, by Gene target (gene_pcassay_target)</option>
+                  <option value="gene_pcassay_rnai_active">BioAssays, RNAi Target, Active (gene_pcassay_rnai_active)</option>
+                  <option value="gene_pcassay_rnai">BioAssays, RNAi Target, Tested (gene_pcassay_rnai)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_pccompound">PubChem Compound Links (gene_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_pcsubstance">PubChem Substance Links (gene_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_pubmed_rif">PubMed (GeneRIF) Links (gene_pubmed_rif)</option>
+                  <option value="gene_pubmed_citedinomim">PubMed (OMIM) Links (gene_pubmed_citedinomim)</option>
+                  <option value="gene_pubmed_pmc_nucleotide">PubMed (nucleotide/PMC) (gene_pubmed_pmc_nucleotide)</option>
+                  <option value="gene_pubmed">PubMed Links (gene_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_snp_geneview"> (gene_snp_geneview)</option>
+                  <option value="gene_snp">SNP Links (gene_snp)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_sparcle">Functional Class (gene_sparcle)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_structure">3D structures (gene_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_taxonomy">Taxonomy Links (gene_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_gap">GAP Links (gene_gap)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gene_dbvar">dbVar (gene_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="genome">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_assembly">Assembly (genome_assembly)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_bioproject">BioProject Links (genome_bioproject)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_gene">Gene Links (genome_gene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_nuccore">Components (genome_nuccore)</option>
+                  <option value="genome_nuccore_samespecies">Other genomes for species (genome_nuccore_samespecies)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_protein">Protein Links (genome_protein)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_proteinclusters">Protein Cluster Links (genome_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_pubmed">PubMed Links (genome_pubmed)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="genome_taxonomy">Taxonomy Links (genome_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="homologene">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_biosystems">BioSystems (homologene_biosystems)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_cdd">Conserved Domain Links (homologene_cdd)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_geoprofiles">GEO Profile Links (homologene_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_gene">Gene Links (homologene_gene)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_homologene">Related HomoloGene Links (homologene_homologene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_nuccore">Nucleotide Links (homologene_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_omim">OMIM Links (homologene_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_pmc">PMC Links (homologene_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_protein">Protein Links (homologene_protein)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_pubmed">PubMed Links (homologene_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_sparcle">Functional Class (homologene_sparcle)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="homologene_taxonomy">Taxonomy Links (homologene_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="ipg">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="ipg_bioproject">BioProject Links (ipg_bioproject)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="ipg_taxonomy">Taxonomy Links (ipg_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="mesh">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+              </param>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="mesh_medgen">MedGen (mesh_medgen)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="mesh_pccompound">PubChem Compound Links (mesh_pccompound)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="mesh_taxonomy">Taxonomy Links (mesh_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="mesh_gap">dbGaP Links (mesh_gap)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="medgen">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="gtr">GTR (gtr)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="mesh">MeSH (mesh)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="gap">dbGaP (gap)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_biosystems_gene_diseases">Pathways + GO (medgen_biosystems_gene_diseases)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_books">NCBI Bookshelf (medgen_books)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_clinvar">ClinVar (medgen_clinvar)</option>
+                </param>
+              </when>
+              <when value="gtr">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_gtr">GTR (medgen_gtr)</option>
+                  <option value="medgen_gtr_tests_clinical">GTR(Clinical) (medgen_gtr_tests_clinical)</option>
+                  <option value="medgen_gtr_tests_research">GTR(Research) (medgen_gtr_tests_research)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_gene_diseases">Gene (medgen_gene_diseases)</option>
+                </param>
+              </when>
+              <when value="mesh">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_mesh">MeSH (medgen_mesh)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_omim">OMIM (medgen_omim)</option>
+                  <option value="medgen_omim_gene">OMIM(Genes) (medgen_omim_gene)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_pmc">PMC Articles (medgen_pmc)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_pubmed_bookshelf_cited">PubMed (Bookshelf cited) (medgen_pubmed_bookshelf_cited)</option>
+                  <option value="medgen_pubmed_genereviews">PubMed (GeneReviews) (medgen_pubmed_genereviews)</option>
+                  <option value="medgen_pubmed_omim">PubMed (OMIM) (medgen_pubmed_omim)</option>
+                  <option value="medgen_pubmed">PubMed (medgen_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_sparcle_diseases">Functional Class (medgen_sparcle_diseases)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="medgen_gap">dbGaP (medgen_gap)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="ncbisearch">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="ncbisearch">NCBI Web Site (ncbisearch)</option>
+              </param>
+              <when value="ncbisearch">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">All Links</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="nlmcatalog">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="books">Books (books)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+              </param>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nlmcatalog_books">Book Links (nlmcatalog_books)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nlmcatalog_pubmed">PubMed Links (nlmcatalog_pubmed)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="nuccore">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="biocollections">Biocollections (biocollections)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_assembly">Assembly (nuccore_assembly)</option>
+                  <option value="nuccore_assembly_wgscontig">Assembly (nuccore_assembly_wgscontig)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_bioproject">BioProject Links (nuccore_bioproject)</option>
+                  <option value="nuccore_bioproject_reference">Reference Genome BioProject Links (nuccore_bioproject_reference)</option>
+                  <option value="nuccore_bioproject_repr">Representative Genome BioProject Links (nuccore_bioproject_repr)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_biosample">BioSample links (nuccore_biosample)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_biosystems">BioSystem Links (nuccore_biosystems)</option>
+                </param>
+              </when>
+              <when value="biocollections">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_biocollections">BioCollections (nuccore_biocollections)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_geoprofiles">GEO Profiles Links (nuccore_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_gene">Gene Links (nuccore_gene)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_genome">Genome (nuccore_genome)</option>
+                  <option value="nuccore_genome_samespecies">RefSeq genome for species (nuccore_genome_samespecies)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_homologene">HomoloGene Links (nuccore_homologene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_nuccore_mgc_refseq"> (nuccore_nuccore_mgc_refseq)</option>
+                  <option value="nuccore_mrna_nuccore">Annotated Genomic (nuccore_mrna_nuccore)</option>
+                  <option value="nuccore_comp_nuccore">Component Of (nuccore_comp_nuccore)</option>
+                  <option value="nuccore_nuccore_comp">Component(Core) Links (nuccore_nuccore_comp)</option>
+                  <option value="nuccore_nuccore_related">Genomic Neighbours (nuccore_nuccore_related)</option>
+                  <option value="nuccore_nuccore_rsgb">Identical GenBank (nuccore_nuccore_rsgb)</option>
+                  <option value="nuccore_nuccore_gbrs">Identical RefSeq (nuccore_nuccore_gbrs)</option>
+                  <option value="nuccore_nuccore_small_genome">Link to all segments from this genome (nuccore_nuccore_small_genome)</option>
+                  <option value="nuccore_nuccore_samespecies_rsgb">Other nucleotides for species (nuccore_nuccore_samespecies_rsgb)</option>
+                  <option value="nuccore_nuccore_mrna">RNA (nuccore_nuccore_mrna)</option>
+                  <option value="nuccore_nuccore_samespecies_gbrs">RefSeq nucleotide for species (nuccore_nuccore_samespecies_gbrs)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_omim">OMIM Links (nuccore_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_pmc">PMC Links (nuccore_pmc)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_popset">PopSet Links (nuccore_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_protein_mgc_url"> (nuccore_protein_mgc_url)</option>
+                  <option value="nuccore_protein_wgs"> (nuccore_protein_wgs)</option>
+                  <option value="nuccore_protein_small_genome">Link to all proteins from this genome (nuccore_protein_small_genome)</option>
+                  <option value="nuccore_protein_mat_peptide">Mature Peptides (nuccore_protein_mat_peptide)</option>
+                  <option value="nuccore_protein">Protein Links (nuccore_protein)</option>
+                  <option value="nuccore_protein_tsa_vdb">Protein from TSA (nuccore_protein_tsa_vdb)</option>
+                  <option value="nuccore_protein_wgs_vdb">Protein from WGS (nuccore_protein_wgs_vdb)</option>
+                  <option value="nuccore_protein_tsa">Proteins in this TSA project (nuccore_protein_tsa)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_proteinclusters">Protein Cluster Links (nuccore_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_pcassay">BioAssay Links (nuccore_pcassay)</option>
+                  <option value="nuccore_pcassay_rna_target">BioAssay by RNA Target (nuccore_pcassay_rna_target)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_pccompound">PubChem Compound Links (nuccore_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_pcsubstance">PubChem Substance Links (nuccore_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_pubmed_refseq">PubMed (RefSeq) Links (nuccore_pubmed_refseq)</option>
+                  <option value="nuccore_pubmed_weighted">PubMed (Weighted) Links (nuccore_pubmed_weighted)</option>
+                  <option value="nuccore_pubmed">PubMed Links (nuccore_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_snp">SNP Links (nuccore_snp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_sra">SRA Links (nuccore_sra)</option>
+                  <option value="nuccore_sra_wgs">SRA WGS (nuccore_sra_wgs)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_sparcle_mrna">Functional Class (nuccore_sparcle_mrna)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_structure">Structure Links (nuccore_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_taxonomy">Taxonomy Links (nuccore_taxonomy)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nuccore_dbvar">dbVar (nuccore_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="nucleotide">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="genome">Genome (genome)</option>
+              </param>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="nucleotide_genome">Assembly to Genome (nucleotide_genome)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="omim">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gtr">GTR (gtr)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_biosample">OMIM links (omim_biosample)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_biosystems">BioSystem Links (omim_biosystems)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_books">Book Links (omim_books)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_clinvar">ClinVar (omim_clinvar)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_geoprofiles">GEO Profile Links (omim_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gtr">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_gtr">GTR (omim_gtr)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_gene">Gene Links (omim_gene)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_homologene">HomoloGene  Links (omim_homologene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_medgen">MedGen (omim_medgen)</option>
+                  <option value="omim_medgen_gene">MedGen (omim_medgen_gene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_nuccore">Nucleotide Links (omim_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_omim">Related Entries (omim_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_pmc">PMC Links (omim_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_protein">Protein Links (omim_protein)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_pcassay">PubChem BioAssay Links (omim_pcassay)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_pccompound">PubChem Compound Links (omim_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_pcsubstance">PubChem Substance Links (omim_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_pubmed_calculated">PubMed (calculated) Links (omim_pubmed_calculated)</option>
+                  <option value="omim_pubmed_cited">PubMed (cited) Links (omim_pubmed_cited)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_sra">Omim links (omim_sra)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_sparcle">Functional Class (omim_sparcle)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_structure">Structure Links (omim_structure)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="omim_dbvar">dbVar (omim_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="orgtrack">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="gtr">GTR (gtr)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+              </param>
+              <when value="gtr">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="orgtrack_gtr">GTR (orgtrack_gtr)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="orgtrack_gene">GTR Lab to Genes (orgtrack_gene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="orgtrack_medgen">MedGen (orgtrack_medgen)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="pmc">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_bioproject">BioProject Links (pmc_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_biosystems_pubmed">Pathways + GO (pmc_biosystems_pubmed)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_books_refs">Cited in Books (pmc_books_refs)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_clinvar">ClinVar (pmc_clinvar)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_cdd">Conserved Domain Links (pmc_cdd)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_gds">GEO DataSet Links (pmc_gds)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_geoprofiles">GEO Profile Links (pmc_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_gene_nucleotide">Gene (nucleotide) (pmc_gene_nucleotide)</option>
+                  <option value="pmc_gene">Gene Links (pmc_gene)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_homologene">HomoloGene Links (pmc_homologene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_medgen">MedGen (pmc_medgen)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_nuccore">Nucleotide Links (pmc_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_omim">OMIM Links (pmc_omim)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_popset">PopSet Links (pmc_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_protein">Protein Links (pmc_protein)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_pcassay">BioAssay Links (pmc_pcassay)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_pccompound">Compound Links (pmc_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_pcsubstance">Substance Links (pmc_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_pubmed_embargo"> (pmc_pubmed_embargo)</option>
+                  <option value="pmc_refs_pubmed">Cited Articles (pmc_refs_pubmed)</option>
+                  <option value="pmc_pubmed">PubMed Links (pmc_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_snp">SNP Links (pmc_snp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_sra">SRA (pmc_sra)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_structure">Structure Links (pmc_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_taxonomy">Taxonomy Links (pmc_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pmc_gap">dbGaP Links (pmc_gap)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="popset">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biocollections">Biocollections (biocollections)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_bioproject">BioProject Links (popset_bioproject)</option>
+                </param>
+              </when>
+              <when value="biocollections">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_biocollections">BioCollections (popset_biocollections)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_nuccore">Nucleotide Links (popset_nuccore)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_pmc"> (popset_pmc)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_popset">PopSet (popset_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_protein">Protein Links (popset_protein)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_pubmed">PubMed Links (popset_pubmed)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="popset_taxonomy">Taxonomy Links (popset_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="protein">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="biocollections">Biocollections (biocollections)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="nucleotide">Nucleotide (nucleotide)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_bioproject">BioProject Links (protein_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_biosystems">BioSystem Links (protein_biosystems)</option>
+                </param>
+              </when>
+              <when value="biocollections">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_biocollections">BioCollections (protein_biocollections)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_cdd_summary"> (protein_cdd_summary)</option>
+                  <option value="protein_cdd_concise_2">Concise Conserved Domain Links (protein_cdd_concise_2)</option>
+                  <option value="protein_cdd">Conserved Domain Links (protein_cdd)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_gene">Gene Links (protein_gene)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_genome">Genome Links (protein_genome)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_homologene">HomoloGene Links (protein_homologene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_nuccore_wgs"> (protein_nuccore_wgs)</option>
+                  <option value="protein_nuccore_mrna">Encoding mRNA (protein_nuccore_mrna)</option>
+                  <option value="protein_nuccore_small_genome">Link to all nucleotide sequences from this genome (protein_nuccore_small_genome)</option>
+                  <option value="protein_nuccore_wp">Link to genomic records (protein_nuccore_wp)</option>
+                  <option value="nuccore_protein_wp">Links to autonomous proteins (nuccore_protein_wp)</option>
+                  <option value="protein_nuccore_mat_peptide">Mature Peptides (protein_nuccore_mat_peptide)</option>
+                  <option value="protein_nuccore">Nucleotide Links (protein_nuccore)</option>
+                  <option value="protein_nuccore_mgc">Nucleotide NIH cDNA clone links (protein_nuccore_mgc)</option>
+                  <option value="protein_nuccore_tsa">TSA master records (protein_nuccore_tsa)</option>
+                </param>
+              </when>
+              <when value="nucleotide">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_nucleotide_mgc_url"> (protein_nucleotide_mgc_url)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_omim">OMIM Links (protein_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_pmc">PMC Links (protein_pmc)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_popset">PopSet Links (protein_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_protein_cdart_summary"> (protein_protein_cdart_summary)</option>
+                  <option value="protein_protein_small_genome">Link to all proteins from this genome (protein_protein_small_genome)</option>
+                  <option value="protein_protein_wp2ref">Link to referencing proteins (protein_protein_wp2ref)</option>
+                  <option value="protein_protein_ref2wp">Links from references to autonomous proteins (protein_protein_ref2wp)</option>
+                  <option value="protein_protein_uniprot2refseq">Protein (RefSeq) (protein_protein_uniprot2refseq)</option>
+                  <option value="protein_protein_refseq2uniprot">Protein (UniProtKB) (protein_protein_refseq2uniprot)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_proteinclusters">Protein Cluster Links (protein_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_pcassay_target_pig">BioAssay by Target (Identical Proteins, List) (protein_pcassay_target_pig)</option>
+                  <option value="protein_pcassay_target">BioAssay by Target (List) (protein_pcassay_target)</option>
+                  <option value="protein_pcassay_target_pig_summary">pcassay (protein_pcassay_target_pig_summary)</option>
+                  <option value="protein_pcassay_target_summary">pcassay (protein_pcassay_target_summary)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_pccompound">PubChem Compound Links (protein_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_pcsubstance">PubChem Substance Links (protein_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_pubmed_refseq">PubMed (RefSeq) Links (protein_pubmed_refseq)</option>
+                  <option value="protein_pubmed_weighted">PubMed (Weighted) Links (protein_pubmed_weighted)</option>
+                  <option value="protein_pubmed">PubMed Links (protein_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_snp_geneview"> (protein_snp_geneview)</option>
+                  <option value="protein_snp">SNP Links (protein_snp)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_structure_related"> (protein_structure_related)</option>
+                  <option value="protein_structure">Identical Structures (protein_structure)</option>
+                  <option value="protein_structure_related_list">Related Structures (List) (protein_structure_related_list)</option>
+                  <option value="protein_structure_direct">Structures (protein_structure_direct)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="protein_taxonomy_wp2species">Links from autonomous proteins to species level organisms (protein_taxonomy_wp2species)</option>
+                  <option value="protein_taxonomy">Taxonomy Links (protein_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="proteinclusters">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_biosystems">BioSystems (proteinclusters_biosystems)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_gene">Gene Links (proteinclusters_gene)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_genome">Genome Links (proteinclusters_genome)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_nuccore">Nucleotide Links (proteinclusters_nuccore)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_protein">Protein Links (proteinclusters_protein)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_pubmed_homology">PubMed (By Homology) Links (proteinclusters_pubmed_homology)</option>
+                  <option value="proteinclusters_pubmed_cdd">PubMed (CDD) Links (proteinclusters_pubmed_cdd)</option>
+                  <option value="proteinclusters_pubmed_curated">PubMed (Curated) Links (proteinclusters_pubmed_curated)</option>
+                  <option value="proteinclusters_pubmed_generif">PubMed (GeneRIF) Links (proteinclusters_pubmed_generif)</option>
+                  <option value="proteinclusters_pubmed_refseq">PubMed (RefSeq) Links (proteinclusters_pubmed_refseq)</option>
+                  <option value="proteinclusters_pubmed_structure">PubMed (Structure) Links (proteinclusters_pubmed_structure)</option>
+                  <option value="proteinclusters_pubmed_swissprot">PubMed (SwissProt) Links (proteinclusters_pubmed_swissprot)</option>
+                  <option value="proteinclusters_pubmed">PubMed Links (proteinclusters_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_sparcle">Functional Class (proteinclusters_sparcle)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="proteinclusters_taxonomy">Taxonomy Links (proteinclusters_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="pcassay">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="books">Books (books)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_books_probe">MLP Chemical Probe Report (pcassay_books_probe)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_cdd_protein_target">Conserved Domains (Full) via Protein Target (pcassay_cdd_protein_target)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_gene_target">Gene Target (pcassay_gene_target)</option>
+                  <option value="pcassay_gene_rnai_active">RNAi Target, Active (pcassay_gene_rnai_active)</option>
+                  <option value="pcassay_gene_rnai">RNAi Target, Tested (pcassay_gene_rnai)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_nuccore">Nucleotide (pcassay_nuccore)</option>
+                  <option value="pcassay_nuccore_rna_target">Nucleotide RNA Target (pcassay_nuccore_rna_target)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_omim">OMIM (pcassay_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_pmc">PMC Articles (pcassay_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_protein_target">Protein Target (pcassay_protein_target)</option>
+                  <option value="pcassay_protein_target_pig">Protein Target, Identical Sequence (pcassay_protein_target_pig)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_pcassay_assay_project">Related Assay Projects (pcassay_pcassay_assay_project)</option>
+                  <option value="pcassay_pcassay_activityneighbor_list">Related BioAssays, by Activity Overlap (List) (pcassay_pcassay_activityneighbor_list)</option>
+                  <option value="pcassay_pcassay_common_gene_list">Related BioAssays, by Common Active Gene (List) (pcassay_pcassay_common_gene_list)</option>
+                  <option value="pcassay_pcassay_neighbor_list">Related BioAssays, by Depositor (List) (pcassay_pcassay_neighbor_list)</option>
+                  <option value="pcassay_pcassay_gene_interaction_list">Related BioAssays, by Gene Interaction (List) (pcassay_pcassay_gene_interaction_list)</option>
+                  <option value="pcassay_pcassay_same_assay_project_list">Related BioAssays, by Same Project (List) (pcassay_pcassay_same_assay_project_list)</option>
+                  <option value="pcassay_pcassay_same_publication_list">Related BioAssays, by Same Publication (List) (pcassay_pcassay_same_publication_list)</option>
+                  <option value="pcassay_pcassay_similar_publication_list">Related BioAssays, by Similar Publication (List) (pcassay_pcassay_similar_publication_list)</option>
+                  <option value="pcassay_pcassay_targetneighbor_list">Related BioAssays, by Target Similarity (List) (pcassay_pcassay_targetneighbor_list)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_pccompound">Compounds (pcassay_pccompound)</option>
+                  <option value="pcassay_pccompound_active">Compounds, Active (pcassay_pccompound_active)</option>
+                  <option value="pcassay_pccompound_inactive">Compounds, Inactive (pcassay_pccompound_inactive)</option>
+                  <option value="pcassay_pccompound_probe">Compounds, Probe (pcassay_pccompound_probe)</option>
+                  <option value="pcassay_pccompound_activityconcnanomolar">Compounds, activity concentration at/below 1 nM (pcassay_pccompound_activityconcnanomolar)</option>
+                  <option value="pcassay_pccompound_activityconcmicromolar">Compounds, activity concentration at/below 1 uM (pcassay_pccompound_activityconcmicromolar)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_pcsubstance">Substances (pcassay_pcsubstance)</option>
+                  <option value="pcassay_pcsubstance_active">Substances, Active (pcassay_pcsubstance_active)</option>
+                  <option value="pcassay_pcsubstance_inactive">Substances, Inactive (pcassay_pcsubstance_inactive)</option>
+                  <option value="pcassay_pcsubstance_probe">Substances, Probe (pcassay_pcsubstance_probe)</option>
+                  <option value="pcassay_pcsubstance_activityconcnanomolar">Substances, activity concentration at/below 1 nM (pcassay_pcsubstance_activityconcnanomolar)</option>
+                  <option value="pcassay_pcsubstance_activityconcmicromolar">Substances, activity concentration at/below 1 uM (pcassay_pcsubstance_activityconcmicromolar)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_pubmed">PubMed Citations (pcassay_pubmed)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_sparcle_target">Target Functional Class (pcassay_sparcle_target)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_structure">Protein Structures (pcassay_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcassay_taxonomy">Taxonomy (pcassay_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="pccompound">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="mesh">MeSH (mesh)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_biosystems">BioSystems (pccompound_biosystems)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_gene">Gene (pccompound_gene)</option>
+                </param>
+              </when>
+              <when value="mesh">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_mesh">MeSH Keyword (pccompound_mesh)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_nuccore">Nucleotide Sequences (pccompound_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_omim">OMIM (pccompound_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_pmc">PMC Articles (pccompound_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_protein">Protein Sequences (pccompound_protein)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_pcassay">BioAssays (pccompound_pcassay)</option>
+                  <option value="pccompound_pcassay_active">BioAssays, Active (pccompound_pcassay_active)</option>
+                  <option value="pccompound_pcassay_inactive">BioAssays, Inactive (pccompound_pcassay_inactive)</option>
+                  <option value="pccompound_pcassay_probe">BioAssays, Probe (pccompound_pcassay_probe)</option>
+                  <option value="pccompound_pcassay_activityconcnanomolar">BioAssays, activity concentration at/below 1 nM (pccompound_pcassay_activityconcnanomolar)</option>
+                  <option value="pccompound_pcassay_activityconcmicromolar">BioAssays, activity concentration at/below 1 uM (pccompound_pcassay_activityconcmicromolar)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_pccompound_mixture">Mixture/Component Compounds (pccompound_pccompound_mixture)</option>
+                  <option value="pccompound_pccompound_parent">Parent Compound (pccompound_pccompound_parent)</option>
+                  <option value="pccompound_pccompound_parent_pulldown">Same Parent (pccompound_pccompound_parent_pulldown)</option>
+                  <option value="pccompound_pccompound_parent_tautomer_pulldown">Same Parent, Any Tautomer (pccompound_pccompound_parent_tautomer_pulldown)</option>
+                  <option value="pccompound_pccompound_parent_connectivity_pulldown">Same Parent, Connectivity (pccompound_pccompound_parent_connectivity_pulldown)</option>
+                  <option value="pccompound_pccompound_parent_isotopes_pulldown">Same Parent, Isotopes (pccompound_pccompound_parent_isotopes_pulldown)</option>
+                  <option value="pccompound_pccompound_parent_stereo_pulldown">Same Parent, Stereochemistry (pccompound_pccompound_parent_stereo_pulldown)</option>
+                  <option value="pccompound_pccompound_sameanytautomer_pulldown">Same, Any Tautomer (pccompound_pccompound_sameanytautomer_pulldown)</option>
+                  <option value="pccompound_pccompound_sameconnectivity_pulldown">Same, Connectivity (pccompound_pccompound_sameconnectivity_pulldown)</option>
+                  <option value="pccompound_pccompound_sameisotopic_pulldown">Same, Isotopes (pccompound_pccompound_sameisotopic_pulldown)</option>
+                  <option value="pccompound_pccompound_samestereochem_pulldown">Same, Stereochemistry (pccompound_pccompound_samestereochem_pulldown)</option>
+                  <option value="pccompound_pccompound">Similar Compounds (pccompound_pccompound)</option>
+                  <option value="pccompound_pccompound_3d">Similar Conformers (pccompound_pccompound_3d)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_pcsubstance">PubChem Mixture Substances (pccompound_pcsubstance)</option>
+                  <option value="pccompound_pcsubstance_same">PubChem Same Substances (pccompound_pcsubstance_same)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_pubmed_mesh">PubMed (MeSH Keyword) (pccompound_pubmed_mesh)</option>
+                  <option value="pccompound_pubmed_publisher">PubMed (Publisher) (pccompound_pubmed_publisher)</option>
+                  <option value="pccompound_pubmed">PubMed Citations (pccompound_pubmed)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_structure">Protein Structures (pccompound_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pccompound_taxonomy">Taxonomy (pccompound_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="pcsubstance">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_biosystems">BioSystems (pcsubstance_biosystems)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_books">Books (pcsubstance_books)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_gene">Gene (pcsubstance_gene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_nuccore">Nucleotide Sequences (pcsubstance_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_omim">OMIM (pcsubstance_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_pmc">PMC Articles (pcsubstance_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_protein">Protein Sequences (pcsubstance_protein)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_pcassay">BioAssays (pcsubstance_pcassay)</option>
+                  <option value="pcsubstance_pcassay_active">BioAssays, Active (pcsubstance_pcassay_active)</option>
+                  <option value="pcsubstance_pcassay_inactive">BioAssays, Inactive (pcsubstance_pcassay_inactive)</option>
+                  <option value="pcsubstance_pcassay_probe">BioAssays, Probe (pcsubstance_pcassay_probe)</option>
+                  <option value="pcsubstance_pcassay_activityconcnanomolar">BioAssays, activity concentration at/below 1 nM (pcsubstance_pcassay_activityconcnanomolar)</option>
+                  <option value="pcsubstance_pcassay_activityconcmicromolar">BioAssays, activity concentration at/below 1 uM (pcsubstance_pcassay_activityconcmicromolar)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_pccompound">PubChem Component Compounds (pcsubstance_pccompound)</option>
+                  <option value="pcsubstance_pccompound_same">PubChem Same Compounds (pcsubstance_pccompound_same)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_pubmed_bookrecords">&quot;Bookshelf (from PubChem Substance)&quot; (pcsubstance_pubmed_bookrecords)</option>
+                  <option value="pcsubstance_pubmed_publisher">PubMed (Publisher) (pcsubstance_pubmed_publisher)</option>
+                  <option value="pcsubstance_pubmed">PubMed Citations (pcsubstance_pubmed)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_structure">Protein Structures (pcsubstance_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pcsubstance_taxonomy">Taxonomy (pcsubstance_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="pubmed">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_assembly">Assembly (pubmed_assembly)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_bioproject">Project Links (pubmed_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_biosample">BioSample Links (pubmed_biosample)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_biosystems">BioSystem Links (pubmed_biosystems)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_books_refs">Cited in Books (pubmed_books_refs)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_clinvar_calculated">ClinVar (calculated) (pubmed_clinvar_calculated)</option>
+                  <option value="pubmed_clinvar">ClinVar (pubmed_clinvar)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_cdd">Conserved Domain Links (pubmed_cdd)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_gds">GEO DataSet Links (pubmed_gds)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_geoprofiles">GEO Profile Links (pubmed_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_gene_rif">Gene (GeneRIF) Links (pubmed_gene_rif)</option>
+                  <option value="pubmed_gene_citedinomim">Gene (OMIM) Links (pubmed_gene_citedinomim)</option>
+                  <option value="pubmed_gene_bookrecords">Gene (from Bookshelf) (pubmed_gene_bookrecords)</option>
+                  <option value="pubmed_gene_pmc_nucleotide">Gene (nucleotide/PMC) (pubmed_gene_pmc_nucleotide)</option>
+                  <option value="pubmed_gene">Gene Links (pubmed_gene)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_genome">Genome Links (pubmed_genome)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_homologene">HomoloGene Links (pubmed_homologene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_medgen_bookshelf_cited">MedGen (Bookshelf cited) (pubmed_medgen_bookshelf_cited)</option>
+                  <option value="pubmed_medgen_genereviews">MedGen (GeneReviews) (pubmed_medgen_genereviews)</option>
+                  <option value="pubmed_medgen_omim">MedGen (OMIM) (pubmed_medgen_omim)</option>
+                  <option value="pubmed_medgen">MedGen (pubmed_medgen)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_nuccore_refseq">Nucleotide (RefSeq) Links (pubmed_nuccore_refseq)</option>
+                  <option value="pubmed_nuccore_weighted">Nucleotide (Weighted) Links (pubmed_nuccore_weighted)</option>
+                  <option value="pubmed_nuccore">Nucleotide Links (pubmed_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_omim_calculated">OMIM (calculated) Links (pubmed_omim_calculated)</option>
+                  <option value="pubmed_omim_cited">OMIM (cited) Links (pubmed_omim_cited)</option>
+                  <option value="pubmed_omim_bookrecords">OMIM (from Bookshelf) (pubmed_omim_bookrecords)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_pmc_embargo"> (pubmed_pmc_embargo)</option>
+                  <option value="pubmed_pmc_local"> (pubmed_pmc_local)</option>
+                  <option value="pubmed_pmc_refs">Cited in PMC (pubmed_pmc_refs)</option>
+                  <option value="pubmed_pmc">PMC Links (pubmed_pmc)</option>
+                  <option value="pubmed_pmc_bookrecords">References in PMC for this Bookshelf citation (pubmed_pmc_bookrecords)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_popset">PopSet Links (pubmed_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_protein_refseq">Protein (RefSeq) Links (pubmed_protein_refseq)</option>
+                  <option value="pubmed_protein_weighted">Protein (Weighted) Links (pubmed_protein_weighted)</option>
+                  <option value="pubmed_protein">Protein Links (pubmed_protein)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_proteinclusters">Protein Cluster Links (pubmed_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_pcassay">PubChem BioAssay (pubmed_pcassay)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_pccompound_mesh">PubChem Compound (MeSH Keyword) (pubmed_pccompound_mesh)</option>
+                  <option value="pubmed_pccompound_publisher">PubChem Compound (Publisher) (pubmed_pccompound_publisher)</option>
+                  <option value="pubmed_pccompound">PubChem Compound (pubmed_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_pcsubstance_publisher">PubChem Substance (Publisher) (pubmed_pcsubstance_publisher)</option>
+                  <option value="pubmed_pcsubstance_bookrecords">PubChem Substance (from Bookshelf) (pubmed_pcsubstance_bookrecords)</option>
+                  <option value="pubmed_pcsubstance">PubChem Substance Links (pubmed_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_pubmed_alsoviewed">Articles frequently viewed together (pubmed_pubmed_alsoviewed)</option>
+                  <option value="pubmed_pubmed_refs">References for PMC Articles (pubmed_pubmed_refs)</option>
+                  <option value="pubmed_pubmed_bookrecords">References for this Bookshelf citation (pubmed_pubmed_bookrecords)</option>
+                  <option value="pubmed_pubmed">Similar articles (pubmed_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_snp_cited">SNP (Cited) (pubmed_snp_cited)</option>
+                  <option value="pubmed_snp">SNP Links (pubmed_snp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_sra">SRA Links (pubmed_sra)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_structure">Structure Links (pubmed_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_taxonomy_entrez">Taxonomy via GenBank (pubmed_taxonomy_entrez)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_gap">dbGaP Links (pubmed_gap)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="pubmed_dbvar">dbVar (pubmed_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="snp">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_bioproject">BioProject Links (snp_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_biosample">BioSample Links (snp_biosample)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_clinvar">ClinVar (snp_clinvar)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_gene">Gene Links (snp_gene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_nuccore">Nucleotide Links (snp_nuccore)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_pmc">PMC Links (snp_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_protein">Protein Links (snp_protein)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_pubmed">PubMed Links (snp_pubmed)</option>
+                  <option value="snp_pubmed_cited">Pubmed (SNP Cited) (snp_pubmed_cited)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_snp_genegenotype">Gene Genotype Links (snp_snp_genegenotype)</option>
+                  <option value="snp_snp_somatic">Somatic SNPs (snp_snp_somatic)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_sparcle">Functional Class (snp_sparcle)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_structure">Structure Links (snp_structure)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_taxonomy">Taxonomy Links (snp_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_gap">GAP Links (snp_gap)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="snp_dbvar">dbVar (snp_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="sra">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_assembly">Assembly Links (sra_assembly)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_bioproject">BioProject Links (sra_bioproject)</option>
+                  <option value="sra_bioproject_sp">bioproject (sra_bioproject_sp)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_biosample">BioSample Links (sra_biosample)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_gds">GEO DataSet Links (sra_gds)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_genome">genome (sra_genome)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_nuccore">Nucleotide Links (sra_nuccore)</option>
+                  <option value="sra_nuccore_wgs">WGS links (sra_nuccore_wgs)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_omim">Omim links (sra_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_pmc">PMC (sra_pmc)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_pubmed">PubMed Links (sra_pubmed)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_taxonomy">Taxonomy Links (sra_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sra_gap_all">dbGaP Links (sra_gap_all)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="seqannot">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="seqannot_bioproject">BioProject links (seqannot_bioproject)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="seqannot_nuccore">NucCore links (seqannot_nuccore)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="sparcle">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gtr">GTR (gtr)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_biosystems">Pathways (sparcle_biosystems)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_clinvar">Clinical Variants (sparcle_clinvar)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_cdd">Domains (sparcle_cdd)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_geoprofiles">Microarray (sparcle_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gtr">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_gtr">Gene Tests (sparcle_gtr)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_gene">Genes (sparcle_gene)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_homologene">Homologene (sparcle_homologene)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_medgen_diseases">Genetic diseases (sparcle_medgen_diseases)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_nuccore_mrna">mRNAs (sparcle_nuccore_mrna)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_omim">OMIM (sparcle_omim)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_protein">Proteins (sparcle_protein)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_proteinclusters">Protein Clusters (sparcle_proteinclusters)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_pcassay_target">BioAssays (sparcle_pcassay_target)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_snp">SNPs (sparcle_snp)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_structure">3D Structures (sparcle_structure)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="sparcle_dbvar">Variants (sparcle_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="structure">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+              </param>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_biosystems">BioSystem Links (structure_biosystems)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_cdd_family_2">Conserved Domain Family Links (structure_cdd_family_2)</option>
+                  <option value="structure_cdd">Conserved Domain Links (structure_cdd)</option>
+                  <option value="structure_cdd_superfamily_2">Conserved Domain Superfamily Links (structure_cdd_superfamily_2)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_gene">Gene (structure_gene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_nuccore">Nucleotide Links (structure_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_omim">OMIM Links (structure_omim)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_pmc">PMC Links (structure_pmc)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_protein">Identical Proteins (structure_protein)</option>
+                  <option value="structure_protein_direct">Proteins (structure_protein_direct)</option>
+                  <option value="structure_protein_related_list">Related Proteins (structure_protein_related_list)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_pcassay">BioAssay Links (structure_pcassay)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_pccompound">PubChem Compound Links (structure_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_pcsubstance">PubChem Substance Links (structure_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_pubmed">PubMed Links (structure_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_snp">SNP Links (structure_snp)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_sparcle">Functional Class (structure_sparcle)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_mmdb">Related Structures (structure_mmdb)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="structure_taxonomy">Taxonomy Links (structure_taxonomy)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="taxonomy">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="assembly">Assembly (assembly)</option>
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="books">Books (books)</option>
+                <option value="cdd">Conserved Domains (cdd)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="geoprofiles">GEO Profiles (geoprofiles)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="genome">Genome (genome)</option>
+                <option value="homologene">HomoloGene (homologene)</option>
+                <option value="mesh">MeSH (mesh)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="popset">PopSet (popset)</option>
+                <option value="protein">Protein (protein)</option>
+                <option value="proteinclusters">Protein Clusters (proteinclusters)</option>
+                <option value="pcassay">PubChem BioAssay (pcassay)</option>
+                <option value="pccompound">PubChem Compound (pccompound)</option>
+                <option value="pcsubstance">PubChem Substance (pcsubstance)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="structure">Structure (structure)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="assembly">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_assembly_exp">Assembly Links (taxonomy_assembly_exp)</option>
+                </param>
+              </when>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_bioproject_exp">BioProject Links (taxonomy_bioproject_exp)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_biosample_exp">BioSample Links (taxonomy_biosample_exp)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_biosystems_exp">Biosystems Links (taxonomy_biosystems_exp)</option>
+                </param>
+              </when>
+              <when value="books">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_books">Books Links (taxonomy_books)</option>
+                </param>
+              </when>
+              <when value="cdd">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_cdd_exp">Conserved Domain Links (taxonomy_cdd_exp)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_gds_exp">GEO DataSet Links (taxonomy_gds_exp)</option>
+                </param>
+              </when>
+              <when value="geoprofiles">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_geoprofiles"> (taxonomy_geoprofiles)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_gene_exp">Gene Links (taxonomy_gene_exp)</option>
+                </param>
+              </when>
+              <when value="genome">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_genome">Genome Links (taxonomy_genome)</option>
+                </param>
+              </when>
+              <when value="homologene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_homologene_exp">HomoloGene Links (taxonomy_homologene_exp)</option>
+                </param>
+              </when>
+              <when value="mesh">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_mesh">MeSH Links (taxonomy_mesh)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_nucleotide_exp">Nucleotide Links (taxonomy_nucleotide_exp)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_pmc">PMC Links (taxonomy_pmc)</option>
+                </param>
+              </when>
+              <when value="popset">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_popset">PopSet Links (taxonomy_popset)</option>
+                </param>
+              </when>
+              <when value="protein">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_protein_species2wp">Links from species level taxonomic nodes to autonomous proteins (taxonomy_protein_species2wp)</option>
+                  <option value="taxonomy_protein_exp">Protein Links (taxonomy_protein_exp)</option>
+                </param>
+              </when>
+              <when value="proteinclusters">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_proteinclusters_exp">Protein Clusters Links (taxonomy_proteinclusters_exp)</option>
+                </param>
+              </when>
+              <when value="pcassay">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_pcassay">PubChem BioAssay Links (taxonomy_pcassay)</option>
+                </param>
+              </when>
+              <when value="pccompound">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_pccompound">PubChem Compound Links (taxonomy_pccompound)</option>
+                </param>
+              </when>
+              <when value="pcsubstance">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_pcsubstance">PubChem Substance Links (taxonomy_pcsubstance)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_pubmed">PubMed Links (taxonomy_pubmed)</option>
+                  <option value="taxonomy_pubmed_entrez">PubMed via GenBank (taxonomy_pubmed_entrez)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_snp_exp">SNP Links (taxonomy_snp_exp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_sra_exp">SRA Links (taxonomy_sra_exp)</option>
+                </param>
+              </when>
+              <when value="structure">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_structure_exp">Structure Links (taxonomy_structure_exp)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="taxonomy_dbvar_exp">dbVar Links (taxonomy_dbvar_exp)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="gap">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="mesh">MeSH (mesh)</option>
+                <option value="medgen">MedGen (medgen)</option>
+                <option value="pmc">PMC (pmc)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sra">SRA (sra)</option>
+                <option value="dbvar">dbVar (dbvar)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_bioproject">BioProject Links (gap_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_biosample_all">BioSample Links (gap_biosample_all)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_gds">GEO DataSets (gap_gds)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_gene">Gene Links (gap_gene)</option>
+                </param>
+              </when>
+              <when value="mesh">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_mesh">MeSH (gap_mesh)</option>
+                </param>
+              </when>
+              <when value="medgen">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_medgen">MedGen (gap_medgen)</option>
+                </param>
+              </when>
+              <when value="pmc">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_pmc">PMC Links (gap_pmc)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_pubmed">PubMed Links (gap_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_snp">SNP Links (gap_snp)</option>
+                </param>
+              </when>
+              <when value="sra">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_sra_all">SRA Links (gap_sra_all)</option>
+                </param>
+              </when>
+              <when value="dbvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="gap_dbvar">dbVar (gap_dbvar)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="dbvar">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="bioproject">BioProject (bioproject)</option>
+                <option value="biosample">BioSample (biosample)</option>
+                <option value="biosystems">BioSystems (biosystems)</option>
+                <option value="clinvar">ClinVar (clinvar)</option>
+                <option value="gds">GEO DataSets (gds)</option>
+                <option value="gene">Gene (gene)</option>
+                <option value="nuccore">Nucleotide (nuccore)</option>
+                <option value="omim">OMIM (omim)</option>
+                <option value="pubmed">PubMed (pubmed)</option>
+                <option value="snp">SNP (snp)</option>
+                <option value="sparcle">Sparcle (sparcle)</option>
+                <option value="taxonomy">Taxonomy (taxonomy)</option>
+                <option value="gap">dbGaP (gap)</option>
+              </param>
+              <when value="bioproject">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_bioproject">BioProjects Links (dbvar_bioproject)</option>
+                </param>
+              </when>
+              <when value="biosample">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_biosample">BioSample Links (dbvar_biosample)</option>
+                </param>
+              </when>
+              <when value="biosystems">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_biosystems_gene">Pathways + GO (dbvar_biosystems_gene)</option>
+                </param>
+              </when>
+              <when value="clinvar">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_clinvar">ClinVar (dbvar_clinvar)</option>
+                </param>
+              </when>
+              <when value="gds">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_gds">GEO DataSets Links (dbvar_gds)</option>
+                </param>
+              </when>
+              <when value="gene">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_gene">Gene Links (dbvar_gene)</option>
+                </param>
+              </when>
+              <when value="nuccore">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_nuccore">Nucleotide Links (dbvar_nuccore)</option>
+                </param>
+              </when>
+              <when value="omim">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_omim">OMIM Links (dbvar_omim)</option>
+                </param>
+              </when>
+              <when value="pubmed">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_pubmed">PubMed Links (dbvar_pubmed)</option>
+                </param>
+              </when>
+              <when value="snp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_snp">dbSNP Links (dbvar_snp)</option>
+                </param>
+              </when>
+              <when value="sparcle">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_sparcle">Functional Class (dbvar_sparcle)</option>
+                </param>
+              </when>
+              <when value="taxonomy">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_taxonomy">Taxonomy Links (dbvar_taxonomy)</option>
+                </param>
+              </when>
+              <when value="gap">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="None">All Links</option>
+                  <option value="dbvar_gap">dbGaP Links (dbvar_gap)</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="grasp">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="grasp">grasp (grasp)</option>
+              </param>
+              <when value="grasp">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">All Links</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="annotinfo">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="none">Not applicable</option>
+              </param>
+              <when value="none">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="gapplus">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="none">Not applicable</option>
+              </param>
+              <when value="none">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="ncbisearch">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="none">Not applicable</option>
+              </param>
+              <when value="none">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+          <when value="grasp">
+            <conditional name="db_to">
+              <param name="db_select_to" type="select" label="To NCBI Database">
+                <option value="none">Not applicable</option>
+              </param>
+              <when value="none">
+                <param name="linkname" type="select" label="Link Name">
+                  <option value="none">Not applicable</option>
+                </param>
+              </when>
+            </conditional>
+          </when>
+    </conditional>
+  </xml>
+  <token name="@LINK_TOKEN@">
+    <![CDATA[
+#if $cmd.db_from_link.db_to.db_select_to == 'n/a':
+    none
+#else:
+    $cmd.db_from_link.db_to.db_select_to
+#end if
+
+$cmd.db_from_link.db_select_from_link
+
+$cmd.cmd_select
+
+#if $cmd.output_format == 'json':
+    --retmode json
+#elif $cmd.output_format == 'text':
+    --retmode uilist
+#else:
+    --retmode xml
+#end if
+
+#if $cmd.db_from_link.db_to.linkname != 'None' and $cmd.cmd_select in ('neighbor', 'neighbor_history', 'neighbor_score'):
+    --linkname $cmd.db_from_link.db_to.linkname
+#end if
+    ]]>
+  </token>
 </macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/efetchin.tabular	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,2 @@
+1899688395
+1896832511
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/einfo.dblist.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eInfoResult PUBLIC "-//NLM//DTD einfo 20190110//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20190110/einfo.dtd">
+<eInfoResult>
+<DbList>
+
+	<DbName>pubmed</DbName>
+	<DbName>protein</DbName>
+	<DbName>nuccore</DbName>
+	<DbName>ipg</DbName>
+	<DbName>nucleotide</DbName>
+	<DbName>structure</DbName>
+	<DbName>sparcle</DbName>
+	<DbName>genome</DbName>
+	<DbName>annotinfo</DbName>
+	<DbName>assembly</DbName>
+	<DbName>bioproject</DbName>
+	<DbName>biosample</DbName>
+	<DbName>blastdbinfo</DbName>
+	<DbName>books</DbName>
+	<DbName>cdd</DbName>
+	<DbName>clinvar</DbName>
+	<DbName>gap</DbName>
+	<DbName>gapplus</DbName>
+	<DbName>grasp</DbName>
+	<DbName>dbvar</DbName>
+	<DbName>gene</DbName>
+	<DbName>gds</DbName>
+	<DbName>geoprofiles</DbName>
+	<DbName>homologene</DbName>
+	<DbName>medgen</DbName>
+	<DbName>mesh</DbName>
+	<DbName>ncbisearch</DbName>
+	<DbName>nlmcatalog</DbName>
+	<DbName>omim</DbName>
+	<DbName>orgtrack</DbName>
+	<DbName>pmc</DbName>
+	<DbName>popset</DbName>
+	<DbName>proteinclusters</DbName>
+	<DbName>pcassay</DbName>
+	<DbName>biosystems</DbName>
+	<DbName>pccompound</DbName>
+	<DbName>pcsubstance</DbName>
+	<DbName>seqannot</DbName>
+	<DbName>snp</DbName>
+	<DbName>sra</DbName>
+	<DbName>taxonomy</DbName>
+	<DbName>biocollections</DbName>
+	<DbName>gtr</DbName>
+</DbList>
+
+</eInfoResult>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.elinkin_1link.json	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,23 @@
+{
+    "header": {
+        "type": "elink",
+        "version": "0.3"
+    },
+    "linksets": [
+        {
+            "dbfrom": "gene",
+            "ids": [
+                "118502329"
+            ],
+            "linksetdbs": [
+                {
+                    "dbto": "nuccore",
+                    "linkname": "gene_nuccore_refseqrna",
+                    "links": [
+                        "1899688395"
+                    ]
+                }
+            ]
+        }
+    ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.elinkin_1link_hist.json	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,22 @@
+{
+    "header": {
+        "type": "elink",
+        "version": "0.3"
+    },
+    "linksets": [
+        {
+            "dbfrom": "nuccore",
+            "ids": [
+                "1899688395"
+            ],
+            "linksetdbhistories": [
+                {
+                    "dbto": "gene",
+                    "linkname": "nuccore_gene",
+                    "querykey": "1"
+                }
+            ],
+            "webenv": "MCID_5f60d98126049170ce66fe2e"
+        }
+    ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.elinkin_1link_id.tabular	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,1 @@
+118502329
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.elinkin_allalllinks_id.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eLinkResult PUBLIC "-//NLM//DTD elink 20101123//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20101123/elink.dtd">
+<eLinkResult>
+<LinkSet>
+	<DbFrom>nuccore</DbFrom>
+	<IdList>
+		<Id>1899688395</Id>
+		<Id>1896832511</Id>
+	</IdList>
+	<LinkSetDbHistory>
+		<DbTo>gene</DbTo>
+		<LinkName>nuccore_gene</LinkName>
+		<QueryKey>1</QueryKey>
+	</LinkSetDbHistory>
+	<WebEnv>MCID_5f60e00e98743c5c3572195e</WebEnv>
+</LinkSet>
+</eLinkResult>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.elinkin_alllinks_id.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eLinkResult PUBLIC "-//NLM//DTD elink 20101123//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20101123/elink.dtd">
+<eLinkResult>
+
+  <LinkSet>
+    <DbFrom>gene</DbFrom>
+    <IdList>
+      <Id>118502329</Id>
+    </IdList>
+    <LinkSetDb>
+      <DbTo>nuccore</DbTo>
+      <LinkName>gene_nuccore</LinkName>
+      
+        <Link>
+				<Id>1899688395</Id>
+			</Link>
+        <Link>
+				<Id>1896832511</Id>
+			</Link>
+      
+    </LinkSetDb>
+    
+    <LinkSetDb>
+      <DbTo>nuccore</DbTo>
+      <LinkName>gene_nuccore_pos</LinkName>
+      
+        <Link>
+				<Id>1896832511</Id>
+			</Link>
+      
+    </LinkSetDb>
+    
+    <LinkSetDb>
+      <DbTo>nuccore</DbTo>
+      <LinkName>gene_nuccore_refseqrna</LinkName>
+      
+        <Link>
+				<Id>1899688395</Id>
+			</Link>
+      
+    </LinkSetDb>
+  </LinkSet>
+</eLinkResult>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.esearch_in_xmlid.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
+<eSearchResult><Count>1</Count><RetMax>1</RetMax><RetStart>0</RetStart><IdList>
+<Id>118502329</Id>
+</IdList><TranslationSet/><TranslationStack>   <TermSet>    <Term>118502329[UID]</Term>    <Field>UID</Field>    <Count>-1</Count>    <Explode>N</Explode>   </TermSet>   <OP>GROUP</OP>  </TranslationStack><QueryTranslation>118502329[UID]</QueryTranslation></eSearchResult>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.esearch_in_xmlid_1link.tabular	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,2 @@
+1899688395
+1896832511
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.esearchin_id.json	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,25 @@
+{
+    "header": {
+        "type": "esearch",
+        "version": "0.3"
+    },
+    "esearchresult": {
+        "count": "1",
+        "retmax": "1",
+        "retstart": "0",
+        "idlist": [
+            "118502329"
+        ],
+        "translationset": [],
+        "translationstack": [
+            {
+                "term": "118502329[UID]",
+                "field": "UID",
+                "count": "-1",
+                "explode": "N"
+            },
+            "GROUP"
+        ],
+        "querytranslation": "118502329[UID]"
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.esearchin_id.tabular	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,1 @@
+118502329
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.esearchin_id_1link.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eLinkResult PUBLIC "-//NLM//DTD elink 20101123//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20101123/elink.dtd">
+<eLinkResult>
+
+  <LinkSet>
+    <DbFrom>gene</DbFrom>
+    <IdList>
+      <Id>118502329</Id>
+    </IdList>
+    <LinkSetDb>
+      <DbTo>nuccore</DbTo>
+      <LinkName>gene_nuccore_refseqrna</LinkName>
+      
+        <Link>
+				<Id>1899688395</Id>
+			</Link>
+      
+    </LinkSetDb>
+  </LinkSet>
+</eLinkResult>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/elink.esearchin_id_alllinks.json	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,38 @@
+{
+    "header": {
+        "type": "elink",
+        "version": "0.3"
+    },
+    "linksets": [
+        {
+            "dbfrom": "gene",
+            "ids": [
+                "118502329"
+            ],
+            "linksetdbs": [
+                {
+                    "dbto": "nuccore",
+                    "linkname": "gene_nuccore",
+                    "links": [
+                        "1899688395",
+                        "1896832511"
+                    ]
+                },
+                {
+                    "dbto": "nuccore",
+                    "linkname": "gene_nuccore_pos",
+                    "links": [
+                        "1896832511"
+                    ]
+                },
+                {
+                    "dbto": "nuccore",
+                    "linkname": "gene_nuccore_refseqrna",
+                    "links": [
+                        "1899688395"
+                    ]
+                }
+            ]
+        }
+    ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/esearch.gene.hist.json	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,27 @@
+{
+    "header": {
+        "type": "esearch",
+        "version": "0.3"
+    },
+    "esearchresult": {
+        "count": "1",
+        "retmax": "1",
+        "retstart": "0",
+        "querykey": "1",
+        "webenv": "MCID_5f5fd696d2dc7951442b7849",
+        "idlist": [
+            "118502329"
+        ],
+        "translationset": [],
+        "translationstack": [
+            {
+                "term": "118502329[UID]",
+                "field": "UID",
+                "count": "-1",
+                "explode": "N"
+            },
+            "GROUP"
+        ],
+        "querytranslation": "118502329[UID]"
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/esearch.gene.hist.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
+<eSearchResult><Count>1</Count><RetMax>1</RetMax><RetStart>0</RetStart><QueryKey>1</QueryKey><WebEnv>MCID_5f5fd690407bc55fc76bad4e</WebEnv><IdList>
+<Id>118502329</Id>
+</IdList><TranslationSet/><TranslationStack>   <TermSet>    <Term>118502329[UID]</Term>    <Field>UID</Field>    <Count>-1</Count>    <Explode>N</Explode>   </TermSet>   <OP>GROUP</OP>  </TranslationStack><QueryTranslation>118502329[UID]</QueryTranslation></eSearchResult>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/esearch.gene.json	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,25 @@
+{
+    "header": {
+        "type": "esearch",
+        "version": "0.3"
+    },
+    "esearchresult": {
+        "count": "1",
+        "retmax": "1",
+        "retstart": "0",
+        "idlist": [
+            "118502329"
+        ],
+        "translationset": [],
+        "translationstack": [
+            {
+                "term": "118502329[UID]",
+                "field": "UID",
+                "count": "-1",
+                "explode": "N"
+            },
+            "GROUP"
+        ],
+        "querytranslation": "118502329[UID]"
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/esearch.gene.tabular	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,22 @@
+106632260
+100008587
+106632264
+106631781
+109910382
+109910381
+109910380
+109910379
+109864282
+109864281
+109864280
+109864279
+109864274
+109864273
+109864272
+109864271
+106631777
+100861532
+100169758
+100169768
+100169767
+100169766
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/esearch.gene.xml	Wed Sep 23 09:51:30 2020 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
+<eSearchResult><Count>1</Count><RetMax>1</RetMax><RetStart>0</RetStart><IdList>
+<Id>118502329</Id>
+</IdList><TranslationSet/><TranslationStack>   <TermSet>    <Term>118502329[UID]</Term>    <Field>UID</Field>    <Count>-1</Count>    <Explode>N</Explode>   </TermSet>   <OP>GROUP</OP>  </TranslationStack><QueryTranslation>118502329[UID]</QueryTranslation></eSearchResult>
+