49c8c187d62eefad13f63e8e01fe12f820eb0ef9 lrnassar Tue May 28 15:02:26 2019 -0700 Updating api.html based on Ann suggestions #18869 diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html index 5dfafdd..d043118 100755 --- src/hg/htdocs/goldenPath/help/api.html +++ src/hg/htdocs/goldenPath/help/api.html @@ -22,62 +22,62 @@ <h6><a href="#Practical_examples">Practical examples</a></h6> <!-- ========== What is JSON data? ============================== --> <a id="Intro"></a> <h2>What is JSON data?</h2> <p> JSON data is a data transfer syntax from a data provider to a data consumer. See also: <a href="https://www.w3schools.com/js/js_json_intro.asp" target=_blank>JSON Introduction</a> </p> <!-- ========== What is the access URL? ============================== --> <a id="Access"></a> <h2>What is the access URL?</h2> <p> -This access url: <b>https://api.genome.ucsc.edu/</b> is used to access +This access URL: <b>https://api.genome.ucsc.edu/</b> is used to access the endpoint functions. For example: <pre> wget -O- 'https://api.genome.ucsc.edu/list/publicHubs' </pre> </p> <!-- ========== What type of data can be accessed? ===================== --> <a id="Return"></a> <h2>What type of data can be accessed?</h2> <p> The following data sets can be accessed at this time: <ul> <li>List of available public hubs</li> <li>List of available UCSC Genome Browser genome assemblies</li> <li>List of genomes from a specified assembly or track hub</li> <li>List of available data tracks from a specified hub or UCSC Genome Browser genome assembly (see also: <a href='trackDb/trackDbHub.html' target=_blank>track definition help</a>)</li> <li>List of chromosomes contained in an assembly hub or UCSC Genome Browser genome assembly</li> <li>List of chromosomes contained in a specific track of an assembly or track hub, or UCSC Genome Browser genome assembly</li> <li>Return DNA sequence from an assembly hub 2bit file, or UCSC Genome Browser assembly</li> <li>Return track data from a specified assembly or track hub, or UCSC Genome Browser assembly</li> </ul> </p> <!-- ========== Endpoint functions ======================= --> <a id="Endpoint"></a> <h2>Endpoint functions to return data</h2> <p> -The url <b>https://api.genome.ucsc.edu/</b> is used to access +The URL <b>https://api.genome.ucsc.edu/</b> is used to access the endpoint functions. For example: <pre> curl -L 'https://api.genome.ucsc.edu/list/ucscGenomes' </pre> </p> <p> <ul> <li><b>/list/publicHubs</b> - list public hubs</li> <li><b>/list/ucscGenomes</b> - list UCSC Genome Browser database genomes</li> <li><b>/list/hubGenomes</b> - list genomes from specified hub</li> <li><b>/list/tracks</b> - list data tracks available in specified hub or database genome (see also: <a href='trackDb/trackDbHub.html' target=_blank>track definition help</a>)</li> <li><b>/list/chromosomes</b> - list chromosomes from a data track in specified hub or database genome</li> <li><b>/getData/sequence</b> - return sequence from specified hub or database genome</li> @@ -143,31 +143,31 @@ a track hub will usually be a UCSC database genome. Assembly hubs will have their own unique <b>genome</b> sequences. Specify <b>genome</b> without a <b>hubUrl</b> to refer to a UCSC Genome Browser assembly. </p> <p> Using the <b>chrom=<name></b> parameter will limit the request to the single specified chromosome. To limit the request to a specific position, both <b>start=4321</b> and <b>end=5678</b> must be given together. </p> <p> Any extra parameters not allowed in a function will be flagged as an error. </p> <!-- ========== Supported track types ======================= --> <a id="Track_types"></a> -<h2>Supported track types, at this time (April 2019), for getData functions</h2> +<h2>Supported track types for getData functions</h2> <p> <ul> <li><a href='/FAQ/FAQformat.html#format1' target=_blank>bed</a></li> <li><a href='/FAQ/FAQformat.html#format1.5' target=_blank>bigBed</a></li> <!-- not yet <li><a href='/FAQ/FAQformat.html#format9.1' target=_blank>bigGenePred</a></li> --> <li><a href='/FAQ/FAQformat.html#format9.5' target=_blank>bigNarrowPeak</a></li> <li><a href='/FAQ/FAQformat.html#format6.1' target=_blank>bigWig</a></li> <li><a href='/FAQ/FAQformat.html#format9' target=_blank>genePred</a></li> <li><a href='/FAQ/FAQformat.html#format9.5' target=_blank>narrowPeak</a></li> <li><a href='/FAQ/FAQformat.html#format2' target=_blank>psl</a></li> <li><a href='http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/rmsk.sql' target=_blank>rmsk - repeat masker</a></li> <li><a href='/FAQ/FAQformat.html#format6' target=_blank>wig</a></li> <li>(Work is underway to support additional track types)</li> @@ -336,31 +336,31 @@ <br><b>api.genome.ucsc.edu/getData/track?genome=hg19;track=knownGene;maxItemsOutput=5</b></p> <p> There are different ways around this item limit, depending on how many items are in the track. For the <i>knownGene</i> track, breaking it down to component chromosome queries using the <b>chrom</b> parameter will suffice. In order to get a listing of the chrom names, and what chroms have data for that track, the <b>/list/chromosomes</b> function can be used.</p> <p> <a href='https://api.genome.ucsc.edu/list/chromosomes?genome=hg19;track=knownGene' target=_blank>Request listing of chroms that have data for the knownGene track in hg19</a> - <br><b>api.genome.ucsc.edu/list/chromosomes?genome=hg19;track=knownGene</b></p> <p> With the list of chrom names that have data, the <b>/getData/track</b> function can be used -again while specifying the <b>chrom</b> parameter. In the following example chr1 is queried -and the <i>itemsReturned</i> field shows a total of 7967 items in the output. Well below the +again while specifying the <b>chrom</b> parameter. In the following example, chr1 is queried +and the <i>itemsReturned</i> field shows a total of 7967 items in the output, well below the 1M limit, meaning all data for chr1 has been extracted. This can then be repeated for all chroms of interest.</p> <p> <a href='https://api.genome.ucsc.edu/getData/track?genome=hg19;track=knownGene;chrom=chr1' -target=_blank>Request iems in knownGene track of hg19, only for chr1</a> - +target=_blank>Request items in knownGene track of hg19, only for chr1</a> - <br><b>api.genome.ucsc.edu/getData/track?genome=hg19;track=knownGene;chrom=chr1</b></p> <p> For tracks that have additional items, such as SNP tracks, the query can be further broken down using the additional <b>start</b> and <b>end</b> parameters.</p> <!--#include virtual="$ROOT/inc/gbPageEnd.html" -->