cb718a9f9f9d2c9d43a92a618da91be0de85ed3d hiram Mon Jul 21 16:32:16 2025 -0700 document the findGenome endpoint and reveal the /list/genarkGenomes endpoing function refs #35468 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index b712d0a1358..95bda4c5860 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -96,30 +96,31 @@

What is the access URL?

This access URL: https://api.genome.ucsc.edu/ is used to access the endpoint functions. For example:

     wget -O- 'https://api.genome.ucsc.edu/list/publicHubs'
 

What type of data can be accessed?

The following data sets can be accessed at this time:

@@ -127,100 +128,107 @@ BLAT FAQ for more info.

Endpoint functions to return data

The URL https://api.genome.ucsc.edu/ is used to access the endpoint functions. For example:

     curl -L 'https://api.genome.ucsc.edu/list/ucscGenomes'
 

Parameters to endpoint functions

The parameters are added to the endpoint URL beginning with a question mark ?, and multiple parameters are separated with the semi-colon ;. For example:

 https://api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM
 

Required and optional parameters

+
Endpoint functionRequiredOptional
/findGenomeqstatsOnly, browser, year, category, status, level, maxItemsOutput
/list/publicHubs(none)(none)
/list/ucscGenomes(none)(none)
/list/genarkGenomes(none)genome, maxItemsOutput
/list/hubGenomeshubUrl(none)
/list/filesgenomeformat=text, maxItemsOutput
/list/tracksgenome or (hubUrl and genome)trackLeavesOnly=1
/list/chromosomesgenome or (hubUrl and genome)track
/list/schema(genome or (hubUrl and genome)) and track(none)
/getData/sequence(genome or (hubUrl and genome)) and chromstart, end, revComp=1
/getData/track(genome or (hubUrl and genome)) and trackchrom, (start and end), maxItemsOutput, jsonOutputArrays
/searchsearch and genomecategories=helpDocs, categories=publicHubs, categories=trackDb

@@ -236,30 +244,39 @@ to the single specified chromosome. To limit the request to a specific position, both start=4321 and end=5678 must be given together. Using the revComp=1 parameter returns the reverse complement.

Use the genome argument with the /list/genarkGenomes function to test for the existence of a specific genome assembly in the Genark set of assembly hubs.

The /list/files endpoint only works for UCSC hosted genome assemblies, not for external hosted assembly hubs.

+The /findGenome endpoint can find genome assemblies in the browser or +any other assembly available at NCBI even when not in the browser. Note, +there are almost 4 million assemblies available at NCBI. All searches are +case insensitive. Force inclusion: Use a + sign before +word to ensure +it appears in the result. Exclude words: Use a - sign before -word to +exclude it from the search result. Wildcard search: Add an * (asterisk) at +end of word* to search for all terms starting with that prefix. +

+

Any extra parameters not allowed in a function will be flagged as an error.

Supported track types for getData functions

Example data access

Your WEB browser can be configured to interpret JSON data and format in a convenient browsing format. Firefox has this function built in, other browsers have add-ons that can be turned on to format JSON data. With your browser thus configured, the following links can demonstrate the functions of the API interface.

Listing functions

    +
  1. find any genome with the word 'dog' - +api.genome.ucsc.edu/findGenome?q=dog
  2. +
  3. find any genome matching the search string: '+white +rhino* -southern' - +api.genome.ucsc.edu/findGenome?q=%2Bwhite%20%2Brhino%2A%20-southern
  4. +
  5. find any genome with the accession id: GCF_028858775.2 - +api.genome.ucsc.edu/findGenome?q=GCF_028858775.2
  6. +
  7. find any genome with the name: GRCh38 - +api.genome.ucsc.edu/findGenome?q=GRCh38
  8. list public hubs - api.genome.ucsc.edu/list/publicHubs
  9. list UCSC database genomes - api.genome.ucsc.edu/list/ucscGenomes
  10. list GenArk assembly hub genomes - api.genome.ucsc.edu/list/genarkGenomes?maxItemsOutput=5
  11. test if genome GCF_028858775.2 exists in the GenArk assembly hub genomes - api.genome.ucsc.edu/list/genarkGenomes?genome=GCF_028858775.2
  12. list genomes from specified hub - api.genome.ucsc.edu/list/hubGenomes?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt
  13. list tracks from specified hub and genome - api.genome.ucsc.edu/list/tracks?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=CAST_EiJ
  14. list tracks from UCSC database genome -