6a2cd2528e36139cde7d4a8881e3402ed7cf3851 mspeir Sun Jan 5 14:12:15 2025 -0800 making samtools sort example functional diff --git src/hg/htdocs/goldenPath/help/bam.html src/hg/htdocs/goldenPath/help/bam.html index ef9482a..ce02732 100755 --- src/hg/htdocs/goldenPath/help/bam.html +++ src/hg/htdocs/goldenPath/help/bam.html @@ -31,31 +31,31 @@ no command line arguments; it should print a brief usage message. For help with <code>samtools</code>, please contact the <a href="http://sourceforge.net/mail/?group_id=246254" target="_blank">SAM tools mailing list</a>.</li> <li> Align sequences using a tool that outputs SAM directly, or outputs a format that can be converted to SAM. (See <a href="http://samtools.sourceforge.net/swlist.shtml" target="_blank">list of tools and converters</a>)</li> <li> Convert SAM to BAM using the samtools program: <pre><code> samtools view -S -b -o my.bam my.sam</code></pre> If converting a SAM file that does not have a proper header, the <code>-t</code> or <code>-T</code> option is necessary. For more information about the command, run <code>samtools view</code> with no other arguments.</li> <li> Sort and create an index for the BAM: - <pre><code> samtools sort my.bam my.sorted + <pre><code> samtools sort -o my.sorted.bam my.bam samtools index my.sorted.bam</code></pre> The sort command appends <code>.bam</code> to <code>my.sorted</code>, creating a BAM file of alignments ordered by leftmost position on the reference assembly. The index command generates a new file, <code>my.sorted.bam.bai</code>, with which genomic coordinates can quickly be translated into file offsets in <code>my.sorted.bam</code>.</li> <li> Move both the BAM file and index file (<code>my.sorted.bam</code> and <code>my.sorted.bam.bai</code>) to an http, https, or ftp location. Note that the Genome Browser looks for an index file with the same URL as the BAM file with the .bai suffix added. If your hosting site does not use the filename as the URL link, you will have to specifically call the location of this .bam.bai index file with the <code>bigDataIndex</code> keyword. This keyword is relevant in Custom Tracks and Track Hubs. You can read more about <em>bigDataIndex</em> in <a href="trackDb/trackDbHub.html#bigDataIndex">the TrackDb Database Definition page</a>.</li> <li>