6823728f16334d9b53bd595688c8f5780cf833fe braney Sun Feb 16 12:13:13 2025 -0800 ongoing work on quickLift. Added support for SQL beds diff --git src/hg/hgc/bigBedClick.c src/hg/hgc/bigBedClick.c index c6e8cc07de6..8153c29d50f 100644 --- src/hg/hgc/bigBedClick.c +++ src/hg/hgc/bigBedClick.c @@ -371,31 +371,31 @@ /* Open BigWig file and get interval list. */ struct bbiFile *bbi = bigBedFileOpenAlias(fileName, chromAliasFindAliases); struct lm *lm = lmInit(0); int ivStart = start, ivEnd = end; char *itemForUrl = item; 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++; } char *quickLiftFile = cloneString(trackDbSetting(tdb, "quickLiftUrl")); struct hash *chainHash = NULL; struct bigBedInterval *bbList = NULL; if (quickLiftFile) - bbList = quickLiftIntervals(quickLiftFile, bbi, chrom, ivStart, ivEnd, &chainHash); + bbList = quickLiftGetIntervals(quickLiftFile, bbi, chrom, ivStart, ivEnd, &chainHash); else bbList = bigBedIntervalQuery(bbi, chrom, ivStart, ivEnd, 0, lm); /* Get bedSize if it's not already defined. */ if (bedSize == 0) { bedSize = bbi->definedFieldCount; } char *scoreFilter = cartOrTdbString(cart, tdb, "scoreFilter", NULL); int minScore = 0; if (scoreFilter) minScore = atoi(scoreFilter); /* Find particular item in list - matching start, and item if possible. */ @@ -439,31 +439,31 @@ extraFields = (restFields + restBedFields); extraFieldCount = restCount - restBedFields; extraFieldPairs = getExtraFields(tdb, extraFields, extraFieldCount); } } int bbFieldCount = bigBedIntervalToRow(bb, chrom, startBuf, endBuf, fields, bedSize+seq1Seq2Fields); if (bbFieldCount != bedSize+seq1Seq2Fields) { errAbort("Disagreement between trackDb field count (%d) and %s fieldCount (%d)", bedSize, fileName, bbFieldCount); } struct bed *bed = NULL; if (quickLiftFile) { - if ((bed = quickLiftBed(bbi, chainHash, bb)) == NULL) + if ((bed = quickLiftIntervalsToBed(bbi, chainHash, bb)) == NULL) errAbort("can't port %s",fields[3]); } else { bed = bedLoadN(fields, bedSize); } if ((bed == NULL) || (bedSize >= 6 && scoreFilter && bed->score < minScore)) continue; if (!(bed->chromStart == start && bed->chromEnd == end)) continue; // if there are extra fields, load them up because we may want to use them in URL: itemForUrl = getIdInUrl(tdb, item); printCustomUrlWithFields(tdb, bed->name, bed->name, item == itemForUrl, extraFieldPairs); if (itemForUrl)