b0d399498f44f25274a920db635078590582230e
gperez2
  Tue Jul 2 15:18:44 2024 -0700
Adding documentation and an example for getting the reverse complement sequence using the API, refs #26691

diff --git src/hg/htdocs/goldenPath/help/api.html src/hg/htdocs/goldenPath/help/api.html
index 188a380..0b3c991 100755
--- src/hg/htdocs/goldenPath/help/api.html
+++ src/hg/htdocs/goldenPath/help/api.html
@@ -112,30 +112,32 @@
 <p>
 <ul>
 <li>hubUrl=&lt;url&gt; - specify track hub or assembly hub URL</li>
 <li>genome=&lt;name&gt; - specify genome assembly in UCSC Genome Browser or track/assembly hub</li>
 <li>track=&lt;trackName&gt; - specify data track in track/assembly hub or UCSC database genome
 assembly</li>
 <li>chrom=&lt;chrN&gt; - specify chromosome name for sequence or track data</li>
 <li>start=&lt;123&gt; - specify start coordinate (0 relative) for data from track or sequence
 retrieval (start and end required together). See also: <a
  href='https://genome-blog.gi.ucsc.edu/blog/the-ucsc-genome-browser-coordinate-counting-systems/'
 target=_blank>UCSC browser coordinate counting systems</a></li>
 <li>end=&lt;456&gt; - specify end coordinate (1 relative) for data from track or sequence
 retrieval (start and end required together). See also: <a
  href='https://genome-blog.gi.ucsc.edu/blog/the-ucsc-genome-browser-coordinate-counting-systems/'
 target=_blank>UCSC browser coordinate counting systems</a></li>
+<li>revComp=1 - return reverse complement of sequence data (chrom, start, and end required
+ together)</li>
 <li>maxItemsOutput=1000 - limit number of items to output, default: 1,000, maximum limit:
 1,000,000 (use <em>-1</em> to get maximum output)</li>
 <li>trackLeavesOnly=1 - on <em>/list/tracks</em> function, only show tracks, do not show
 composite container information</li>
 <li>jsonOutputArrays=1 - on <em>/getData/track</em> function, JSON format is array type
 for each item of data, instead of the default object type</li>
 <li>format=text - on <em>/list/files</em> function, return plain text listing
 of download files instead of JSON format output (which includes more meta-data information).  Text output contains less meta-data in comment lines prefixed by the '#' hash character.</li>
 <li>search=&lt;term&gt;&genome=&lt;name&gt; - on <em>/search</em> function, specify term to be
 search within a UCSC Genome Browser genome assembly</li>
 <li>categories=helpDocs - on <em>/search?search=&lt;term&gt;&genome=&lt;name&gt;</em> function, restrict the search
 within the UCSC Genome Browser help documentation</li>
 <li>categories=publicHubs - on <em>/search?search=&lt;term&gt;&genome=&lt;name&gt;</em> function, restrict the search
 within the UCSC Genome Browser Public Hubs</li>
 <li>categories=trackDb - on <em>/search?search=&lt;term&gt;&genome=&lt;name&gt;</em> function, restrict the search
@@ -152,49 +154,50 @@
 </p>
 
 <!-- ========== Required and optional parameters  ======================= -->
 <a id="Parameter_use"></a>
 <h2>Required and optional parameters</h2>
 <p>
 <table>
 <tr><th>Endpoint function</th><th>Required</th><th>Optional</th></tr>
 <tr><th>/list/publicHubs</th><td>(none)</td><td>(none)</td></tr>
 <tr><th>/list/ucscGenomes</th><td>(none)</td><td>(none)</td></tr>
 <tr><th>/list/hubGenomes</th><td>hubUrl</td><td>(none)</td></tr>
 <tr><th>/list/files</th><td>genome</td><td>format=text, maxItemsOutput</td></tr>
 <tr><th>/list/tracks</th><td>genome or (hubUrl and genome)</td><td>trackLeavesOnly=1</td></tr>
 <tr><th>/list/chromosomes</th><td>genome or (hubUrl and genome)</td><td>track</td></tr>
 <tr><th>/list/schema</th><td>(genome or (hubUrl and genome)) and track</td><td>(none)</td></tr>
-<tr><th>/getData/sequence</th><td>(genome or (hubUrl and genome)) and chrom</td><td>start and
-end</td></tr>
+<tr><th>/getData/sequence</th><td>(genome or (hubUrl and genome)) and chrom</td><td>start, end, and
+revComp=1</td></tr>
 <tr><th>/getData/track</th><td>(genome or (hubUrl and genome)) and track</td><td>chrom,
 (start and end), maxItemsOutput, jsonOutputArrays</td></tr>
 <tr><th>/search</th><td>search and genome</td><td>categories=helpDocs,
 categories=publicHubs, categories=trackDb</td></tr>
 </table>
 </p>
 <p>
 The <b>hubUrl</b> and <b>genome</b> parameters are required together to
 specify a unique genome in an assembly or track hub.  The <b>genome</b> for
 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=&lt;name&gt;</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.
+Using the <b>revComp=1</b> parameter returns the reverse complement.
 </p>
 <p>
 The <b>/list/files</b> endpoint only works for UCSC hosted genome assemblies,
 not for external hosted assembly hubs.
 </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 for getData functions</h2>
 <p>
 <ul>
 <li><a href='/FAQ/FAQformat.html#format21' target=_blank>barChart</a></li>
@@ -282,30 +285,33 @@
 target=_blank>list download files for UCSC GenArk genome 'GCF_000955945.1' in JSON format limit 5 items output</a> -
 <br><b>api.genome.ucsc.edu/list/files?genome=GCF_000955945.1;maxItemsOutput=5</b></li>
 <li><a href='https://api.genome.ucsc.edu/list/files?genome=hs1;format=text;maxItemsOutput=5'
 target=_blank>list download files for UCSC genome 'hs1' in plain text format limit 5 items output</a> -
 <br><b>api.genome.ucsc.edu/list/files?genome=hs1;format=text;maxItemsOutput=5</b></li>
 </ol>
 <a id="getData_examples"></a>
 <h3>getData functions</h3>
 <ol>
 <li><a href='https://api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM'
 target=_blank>Get DNA sequence from specified chromosome in UCSC database genome</a> -
 <br><b>api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM</b></li>
 <li><a href='https://api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM;start=4321;end=5678'
 target=_blank>Get DNA sequence from specified chromosome and start,end coordinates in UCSC database genome</a> -
 <br><b>api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM;start=4321;end=5678</b></li>
+<li><a href='https://api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM;start=4321;end=5678;revComp=1'
+target=_blank>Get the reverse complement of the DNA sequence from specified chromosome and start,end coordinates in UCSC database genome</a> -
+<br><b>api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chrM;start=4321;end=5678;revComp=1</b></li>
 <li><a href='https://api.genome.ucsc.edu/getData/sequence?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=mm10;chrom=chrM;start=4321;end=5678'
 target=_blank>Get DNA sequence from a track hub where 'genome' is a UCSC database</a> -
 <br><b>api.genome.ucsc.edu/getData/sequence?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=mm10;chrom=chrM;start=4321;end=5678</b></li>
 <li><a href='https://api.genome.ucsc.edu/getData/sequence?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=CAST_EiJ;chrom=chr1;start=4321;end=5678'
 target=_blank>Get DNA sequence from specified chromosome and start,end coordinates in an assembly hub genome</a> -
 <br><b>api.genome.ucsc.edu/getData/sequence?hubUrl=http://hgdownload.soe.ucsc.edu/hubs/mouseStrains/hub.txt;genome=CAST_EiJ;chrom=chr1;start=4321;end=5678</b></li>
 <li><a href='https://api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;maxItemsOutput=100'
 target=_blank>Get track data for specified track in UCSC database genome</a> -
 <br><b>api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;maxItemsOutput=100</b></li>
 <li><a href='https://api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;chrom=chrM'
 target=_blank>Get track data for specified track and chromosome in UCSC database genome</a> -
 <br><b>api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;chrom=chrM</b></li>
 <li><a href='https://api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;chrom=chr1;start=47000;end=48000'
 target=_blank>Get track data for specified track, chromosome and start,end coordinates in UCSC database genome</a> -
 <br><b>api.genome.ucsc.edu/getData/track?genome=hg38;track=gold;chrom=chr1;start=47000;end=48000</b></li>