e8c22713a73f66943a295ed2b4912e6d8069e782 braney Wed Sep 10 16:54:43 2025 -0700 allow quickLiftChain and liftOverChain tables to have different names specified in hg.conf diff --git src/hg/lib/quickLift.c src/hg/lib/quickLift.c index 1cb075c0af7..8eb6f882c2c 100644 --- src/hg/lib/quickLift.c +++ src/hg/lib/quickLift.c @@ -77,30 +77,34 @@ 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; +// sometimes the edges are way too large. Needs research +//if (maxGapBefore > 1000000) + //maxGapBefore = maxGapAfter = 1000000; + 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; @@ -438,15 +442,25 @@ previousQEnd = qEnd; previousTEnd = tEnd; // now find the mismatches in this block struct quickLiftRegions *mismatches = getMismatches(ourDb, bc->strand[0], chrom, liftDb, bc->qName, bl, bc->qSize, seqStart, seqEnd, bc->name); hrList = slCat(mismatches, hrList); } } slSort(&hrList, hrCmp); hashAdd(highLightsHash, quickLiftFile, hrList); return hrList; } + +char *quickLiftChainTable() +/* Return the name of the quickLiftChain table. */ +{ +static char *quickLiftChainTable = NULL; +if (quickLiftChainTable == NULL) + quickLiftChainTable = cfgOptionEnvDefault("QUICKLIFTCHAINNAME", + quickLiftChainTableConfVariable, defaultQuickLiftChainTableName); +return quickLiftChainTable; +}