353a34ac7e7638457db3f55e57452069113d860b
braney
  Sun Sep 6 13:34:28 2026 -0700
Add a bigNet track type, a net of alignments in a bigBed, refs #20824

Track hubs have had no way to show a real net.  The usual stand-in is a
net rendered as a maf, which loses the level structure that makes a net
useful for establishing orthologous sequence.  bigNet holds the netAlign
columns in a bigBed, so a hub can carry the net itself.

The format is bed6+20: the target in chrom/chromStart/chromEnd, the query
sequence in name, the query strand in strand, then level and the rest of
the netAlign fields.  The trackDb line is

type bigNet <targetDb> <chainTrack>

mirroring type netAlign.  chainTrack is the plain trackDb name of the
bigChain track in the same hub; hgc adds the hub prefix itself.

chainNetLoadRangeHub() builds a chainNet from a bigBed range query and
hands it to the same helpToNet() the SQL path uses, so the nesting is
rebuilt the same way.  netDraw picks its loader off tg->isBigBed and the
drawing code below that is untouched.  genericNetClick does the same for
the details page and follows the named chain track for the alignment.

Also bounds the level walk in helpToNet() by help->maxDepth.  It could
read one past the end of the levels array.

netToBigNet converts a net file to bedToBigBed input.  It writes the tab
line itself rather than calling bigNetTabOut, because autoSql prints a
double with %g and that drops digits off a chain score.

diff --git src/hg/htdocs/goldenPath/help/trackDb/trackDbDoc.html src/hg/htdocs/goldenPath/help/trackDb/trackDbDoc.html
index 59538249a4c..0a2375fce1b 100755
--- src/hg/htdocs/goldenPath/help/trackDb/trackDbDoc.html
+++ src/hg/htdocs/goldenPath/help/trackDb/trackDbDoc.html
@@ -104,31 +104,31 @@
 
 <OL>
     <LI><A HREF="#commonSettings">Common trackDb settings</A></LI>
     <LI><A HREF="#settingsByType">Settings by track type</A> &ndash; with examples
     <UL>
         <LI><A HREF="#bed_-_Item_or_Region_Track_Settings">bed/bigBed</A>:
                                                                 Item or region tracks</LI>
         <LI><A HREF="#wig_-_Signal_Graphing_Track_Settings">wig/bigWig/bedGraph</A>:
                                                                 Signal graphing tracks</LI>
         <LI><A HREF="#genePred">genePred/bigGenePred</A>: Gene models and predictions</LI>
         <LI><A HREF="#bam">bam/cram</A>: Compressed Sequence Alignment/Map tracks</LI>
         <LI><A HREF="#pgSnp">pgSnp</A>: Personal Genome SNP tracks</LI>
         <LI><A HREF="#vcfTabix">vcfTabix</A>: Variant Call Format</LI>
         <LI><A HREF="#vcfPhasedTrio">vcfPhasedTrio</A>: Variant Call Format Trios</LI>
         <LI><A HREF="#psl">psl/bigPsl</A>: Sequence alignments</LI>
-        <LI><A HREF="#chain">chain/bigChain and netAlign</A>: Paired sequence alignments</LI>
+        <LI><A HREF="#chain">chain/bigChain and netAlign/bigNet</A>: Paired sequence alignments</LI>
         <LI><A HREF="#wigMaf">wigMaf/bigMaf</A>: Multiple alignments</LI>
         <LI><A HREF="#expRatio">expRatio</A>: Microarray expression data</LI>
         <LI><A HREF="#snp">snp</A>: Short genetic variants from dbSNP</LI>
         <LI><A HREF="#bigBarChart">barChart/bigBarChart</A>: Categorical values over a region</LI>
         <LI><A HREF="#bigInteract">interact/bigInteract</A>: Pairwise interactions</LI>
         <LI><A HREF="#bigLolly">bigLolly</A>: Lollipop charts</LI>
         <LI><A HREF="#hic">hic</A>: Hi-C contact matrices</LI>
         <LI><A HREF="#rareTypes">Specialize or rarely used</A>:<BR>
             <A HREF="#altGraphX">altGraphX</A>,
             <A HREF="#bedDetail">bedDetail</A>,
             <A HREF="#clonePos">clonePos</A>,
             <A HREF="#ctgPos">ctgPos</A>,
             <A HREF="#downloadsOnly">downloadsOnly</A>,
             <A HREF="#encodeFiveC">encodeFiveC</A>,
             <A HREF="#factorSource">factorSource</A>,