bbf9b5788beae5c61fe8a30bc824f4b8985927e9
mspeir
  Wed Nov 20 10:51:05 2024 -0800
changing bigChain steps to use chainToBigChain rather than hgLoadChain, refs #33972

diff --git src/hg/htdocs/goldenPath/help/bigChain.html src/hg/htdocs/goldenPath/help/bigChain.html
index a483962..21b28bc 100755
--- src/hg/htdocs/goldenPath/help/bigChain.html
+++ src/hg/htdocs/goldenPath/help/bigChain.html
@@ -58,80 +58,74 @@
 <h2>Creating a bigChain track</h2>
 <p>
 To create a bigChain track, follow these steps:</p>
 <p>
 <strong>Step 1.</strong> 
 If you already have a chain file you would like to convert to a bigChain, skip to <em>Step 3</em>.
 Otherwise download <a href="examples/chr22_KI270731v1_random.hg38.mm10.rbest.chain">this example 
 chain file</a> for the human GRCh38 (hg38) assembly.</p>
 <p>
 <strong>Step 2.</strong> 
 Download these autoSql files needed by <code>bedToBigBed</code>: 
 <em><a href="examples/bigChain.as">bigChain.as</a></em> and 
 <em><a href="examples/bigLink.as">bigLink.as</a></em>.</p>
 <p>
 <strong>Step 3.</strong> 
-Download the <code>bedToBigBed</code> and <code>hgLoadChain</code> programs from the UCSC
+Download the <code>bedToBigBed</code> and <code>chainToBigChain</code> programs from the UCSC
 <a href="http://hgdownload.soe.ucsc.edu/admin/exe/">binary utilities directory</a>.</p>
 <p>
 <strong>Step 4.</strong> 
 Use the <code>fetchChromSizes</code> script from the 
 <a href="http://hgdownload.soe.ucsc.edu/admin/exe/">same directory</a> to create a 
 <em>chrom.sizes</em> file for the UCSC database with which you are working (e.g., hg38). 
 Alternatively, you can download the 
 <em>chrom.sizes</em> file for any assembly hosted at UCSC from our 
 <a href="http://hgdownload.soe.ucsc.edu/downloads.html">downloads</a> page (click on &quot;Full 
 data set&quot; for any assembly). For example, the <em>hg38.chrom.sizes</em> file for the hg38 
 database is located at 
 <a href="http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes" 
 target="_blank">http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes</a>.</p>
 <p>
 Here are wget commands to obtain these above files.
 <pre><code>wget https://genome.ucsc.edu/goldenPath/help/examples/bigChain.as
 wget https://genome.ucsc.edu/goldenPath/help/examples/bigLink.as
 wget http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes
 wget https://genome.ucsc.edu/goldenPath/help/examples/chr22_KI270731v1_random.hg38.mm10.rbest.chain
 </code></pre></p>
+<p>
 <strong>Step 5.</strong>
-Use the <code>hgLoadChain</code> utility to generate the <em>chain.tab</em> and <em>link.tab</em> 
-files needed to create the bigChain file:</p> 
-<pre><code>hgLoadChain -noBin -test hg38 bigChain chr22_KI270731v1_random.hg38.mm10.rbest.chain</code></pre>
+Use the <code>chainToBigChain</code> utility to generate the pre-bigChain and pre-bigLink files:</p>
+<pre><code>chainToBigChain chr22_KI270731v1_random.hg38.mm10.rbest.chain bigChain.pre bigChain.link.pre</code></pre>
 <p>
 <strong>Step 6.</strong> 
-Create the bigChain file from your input chain file using a combination of <code>sed</code>, 
-<code>awk</code> and the <code>bedToBigBed</code> utility: 
-<pre><code>sed 's/\.000000//' chain.tab | awk 'BEGIN {OFS="\t"} {print $2, $4, $5, $11, 1000, $8, $3, $6, $7, $9, $10, $1}' &gt; chr22_KI270731v1_random.hg38.mm10.rbest.bigChain
-bedToBigBed -type=bed6+6 -as=bigChain.as -tab chr22_KI270731v1_random.hg38.mm10.rbest.bigChain hg38.chrom.sizes bigChain.bb</code></pre></p> 
+Create the bigChain and bigLink files using the <code>bedToBigBed</code> utility:
+<pre><code>bedToBigBed -type=bed6+6 -as=bigChain.as -tab bigChain.pre hg38.chrom.sizes bigChain.bb
+bedToBigBed -type=bed4+1 -as=bigLink.as -tab bigChain.link.pre hg38.chrom.sizes bigChain.link.bb
+</code></pre></p>
 <p>
 <strong>Step 7.</strong> 
-To display your date in the Genome Browser, you must also create a binary indexed link file to 
-accompany your bigChain file:</p> 
-<pre><code>awk 'BEGIN {OFS="\t"} {print $1, $2, $3, $5, $4}' link.tab | sort -k1,1 -k2,2n &gt; bigChain.bigLink
-bedToBigBed -type=bed4+1 -as=bigLink.as -tab bigChain.bigLink hg38.chrom.sizes bigChain.link.bb </code></pre>
-<p>
-<strong>Step 8.</strong> 
 Move the newly created bigChain (<em>bigChain.bb</em>) and bigLink (<em>bigChain.link.bb</em>)
 files to a web-accessible http, https or ftp location.</p>
 <p>
-<strong>Step 9.</strong> 
+<strong>Step 8.</strong>
 Construct a <a href="hgTracksHelp.html#CustomTracks">custom track</a> using a single 
 <a href="hgTracksHelp.html#TRACK">track line</a>. Note that any of the track attributes listed 
 <a href="customTrack.html#TRACK">here</a> are applicable to tracks of type bigBed. The most basic
 version of the track line will look something like this:</p>
 <pre><code>track type=bigChain name="My Big Chain" bigDataUrl=http://myorg.edu/mylab/bigChain.bb linkDataUrl=http://myorg.edu/mylab/bigChain.link.bb </code></pre>
 <p>
-<strong>Step 10.</strong> 
+<strong>Step 9.</strong>
 Paste the custom track line into the text box on the 
 <a href="../../cgi-bin/hgCustom">custom track management page</a>.</p>
 <p>
 The <code>bedToBigBed</code> program can be run with several additional options. For a full
 list of the available options, type <code>bedToBigBed</code> (with no arguments) on the command line
 to display the usage message. </p>
 
 <h2>Examples</h2>
 <h3>Example #1</h3>
 <p>
 In this example, you will create a bigChain custom track using an existing bigChain file,
 <em>bigChain.bb</em>, located on the UCSC Genome Browser http server. This file contains data for 
 the hg38 assembly.</p>
 <p>
 To create a custom track using this bigChain file: 
@@ -156,31 +150,31 @@
 track display. Note that the details page displays information about the individual chains, similar 
 to that which is available for a standard chain track.</p>
 
 <h3>Example #2</h3>
 <p>
 In this example, you will create your own bigChain file from an existing chain input file.</p>
 <ol>
   <li>
   Save <a href="examples/chr22_KI270731v1_random.hg38.mm10.rbest.chain">this chain file</a> to your 
   computer (<em>Step 1</em> in <em>Creating a bigChain track</em>, above).</li>
   <li>
   Save the autoSql files <a href="examples/bigChain.as"><em>bigChain.as</em></a> and 
   <a href="examples/bigLink.as"><em>bigLink.as</em></a> to your computer (<em>Step 2</em>, 
   above).</li>
   <li>
-  Download the <code>bedToBigBed</code> and <code>hgLoadChain</code> 
+  Download the <code>bedToBigBed</code> and <code>chainToBigChain</code>
   <a href="http://hgdownload.soe.ucsc.edu/admin/exe/">utilities</a> (<em>Step 3</em>, above).</li>
   <li>
   Save the <a href="hg38.chrom.sizes"><em>hg38.chrom.sizes</em> text file</a> to your computer. This
   file contains the chrom.sizes for the human hg38 assembly (<em>Step 4</em>, above).</li>
   <li>
   Run the utilities in <em>Steps 5-7</em>, above, to create the bigChain and bigLink output 
   files. </li> 
   <li>
   Place the newly created bigChain (<em>bigChain.bb</em>) and and bigLink 
   (<em>bigChain.link.bb</em>) files on a web-accessible server (<em>Step 8</em>).</li>
   <li>
   Construct a track line that points to the bigChain file (<em>Step 9</em>, above).</li>
   <li>
   Create the custom track on the human assembly hg38 (Dec. 2013), and view it in the Genome Browser 
   (<em>Step 10</em>, above).</li>