4d4360dde0ef8283aa490ef1a1903dfda56341ab
braney
  Sat Jun 7 11:28:03 2025 -0700
fix problems with full elements not being sucked in on negative strand
quickLifts

diff --git src/hg/lib/quickLift.c src/hg/lib/quickLift.c
index 448909ae095..5020e3caeb5 100644
--- src/hg/lib/quickLift.c
+++ src/hg/lib/quickLift.c
@@ -69,30 +69,36 @@
             if (gap > maxGapBefore)
                 maxGapBefore = gap;
             }
         if (bb->end > qEnd)
             {
             int gap = bb->end - qEnd;
             if (gap > maxGapAfter)
                 maxGapAfter = gap;
             }
         }
     bbList = slCat(thisInterval, bbList);
     }
 
 // now we need to grab the links outside of our viewport so we can map long items
 // probably we could reuse the chains from above but for the moment this is easier
+// For the moment we use the same padding on both sides so we don't have to worry about strand
+if (maxGapBefore > maxGapAfter)
+    maxGapAfter = maxGapBefore;
+else
+    maxGapBefore = maxGapAfter;
+
 int newStart = start - maxGapBefore * 2;
 if (newStart < 0)
     newStart = 0;
 int newEnd = end + maxGapAfter * 2;
 chainList = chainLoadIdRangeHub(NULL, quickLiftFile, linkFileName, chrom, newStart, newEnd, -1);
 for(chain = chainList; chain; chain = chain->next)
     {
     chainSwap(chain);
 
     if (*pChainHash == NULL)
         *pChainHash = newHash(0);
     liftOverAddChainHash(*pChainHash, chain);
     }
 
 return bbList;