d1a11e955077906d793c5f6ca9eee3c40a77f1b0 braney Wed Feb 19 14:24:48 2020 -0800 use a name index in a bigBed if available and there are identifiers in hgTables and the region is whole genome diff --git src/hg/hgTables/hgTables.c src/hg/hgTables/hgTables.c index 241640d..9565b5b 100644 --- src/hg/hgTables/hgTables.c +++ src/hg/hgTables/hgTables.c @@ -384,30 +384,44 @@ } struct hgPositions *lookupPosition(struct dyString *dyWarn) /* Look up position (aka range) if need be. Return a container of matching tables and positions. * Warnings/errors are appended to dyWarn. */ { char *range = windowsToAscii(cloneString(cartUsualString(cart, hgtaRange, ""))); range = trimSpaces(range); if (isEmpty(range)) range = hDefaultPos(database); struct hgPositions *hgp = hgFindSearch(cart, &range, NULL, NULL, NULL, getScriptName(), dyWarn); cartSetString(cart, hgtaRange, range); return hgp; } +boolean isRegionWholeGenome() +/* Return TRUE if the current region is the whole genome. */ +{ +char *regionType = cartString(cart, hgtaRegionType); + +if (regionType == NULL) + return TRUE; + +if (sameString(regionType, hgtaRegionTypeGenome)) + return TRUE; + +return FALSE; +} + struct region *getRegions() /* Consult cart to get list of regions to work on. */ { char *regionType = cartUsualString(cart, hgtaRegionType, "genome"); struct region *regionList = NULL, *region; if (sameString(regionType, hgtaRegionTypeGenome)) { regionList = getRegionsFullGenome(); } else if (sameString(regionType, hgtaRegionTypeRange)) { char *range = cartString(cart, hgtaRange); boolean parseOk = FALSE; regionList = AllocVar(region); if (! strchr(range, ':'))