13d50002b54653bf8579092e518a479b978ab7fa
braney
  Fri Mar 3 13:52:56 2023 -0800
ongoing work on snakes... added optional dotplot for bigPsl hgc pages

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index aaf42d3..e02a92c 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -254,30 +254,31 @@
 #include "hmmstats.h"
 #include "aveStats.h"
 #include "trix.h"
 #include "bPlusTree.h"
 #include "customFactory.h"
 #include "dupTrack.h"
 #include "iupac.h"
 #include "clinvarSubLolly.h"
 #include "jsHelper.h"
 #include "errCatch.h"
 #include "htslib/bgzf.h"
 #include "htslib/kstring.h"
 #include "pipeline.h"
 #include "genark.h"
 #include "chromAlias.h"
+#include "dotPlot.h"
 
 static char *rootDir = "hgcData";
 
 #define LINESIZE 70  /* size of lines in comp seq feature */
 #define MAX_DISPLAY_QUERY_SEQ_SIZE 5000000  // Big enough for HLA alts
 
 struct cart *cart;	/* User's settings. */
 char *seqName;		/* Name of sequence we're working on. */
 int winStart, winEnd;   /* Bounds of sequence. */
 char *database;		/* Name of mySQL database. */
 char *organism;		/* Colloquial name of organism. */
 char *genome;		/* common name, e.g. Mouse, Human */
 char *scientificName;	/* Scientific name of organism. */
 
 /* for earlyBotCheck() function at the beginning of main() */
@@ -3287,30 +3288,33 @@
 /* Handle click in big psl track. */
 {
 struct psl* pslList = NULL;
 char *fileName = bbiNameFromSettingOrTable(tdb, conn, tdb->table);
 struct bbiFile *bbi =  bigBedFileOpenAlias(fileName, chromAliasFindAliases);
 struct lm *lm = lmInit(0);
 int ivStart = start, ivEnd = end;
 
 if (start == end)
     {  
     // item is an insertion; expand the search range from 0 bases to 2 so we catch it:
     ivStart = max(0, start-1);
     ivEnd++;
     }  
 
+if (cfgOptionBooleanDefault("drawDot", FALSE))
+    bigPslDotPlot(tdb, bbi, seqName, winStart, winEnd);
+
 boolean showEvery = sameString(item, "PrintAllSequences");
 boolean showAll = trackDbSettingOn(tdb, "showAll");
 unsigned seqTypeField =  bbExtraFieldIndex(bbi, "seqType");
 struct bigBedInterval *bb, *bbList = NULL;
 
 // If showAll is on, show all alignments with this qName, not just the
 // selected one.
 if (showEvery)
     {
     struct bbiChromInfo *chrom, *chromList = bbiChromList(bbi);
     for (chrom = chromList; chrom != NULL; chrom = chrom->next)
         {
         char *chromName = chrom->name;
         int start = 0, end = chrom->size;
         int itemsLeft = 0;  // Zero actually means no limit....