67918e4571e0a4002aa554ea78b2a1bbb592e4d9 markd Thu Jan 16 10:40:29 2020 -0800 64bit blat work diff --git src/jkOwnLib/genoFind.c src/jkOwnLib/genoFind.c index c6d2a82..6333949 100644 --- src/jkOwnLib/genoFind.c +++ src/jkOwnLib/genoFind.c @@ -1202,39 +1202,38 @@ static int gfClumpCmpQueryCoverage(const void *va, const void *vb) /* Compare to sort based on query coverage. */ { const struct gfClump *a = *((struct gfClump **)va); const struct gfClump *b = *((struct gfClump **)vb); return (b->queryCoverage - a->queryCoverage); } static void findClumpBounds(struct gfClump *clump, int tileSize) /* Figure out qStart/qEnd tStart/tEnd from hitList */ { struct gfHit *hit; -int x; hit = clump->hitList; if (hit == NULL) return; clump->qStart = clump->qEnd = hit->qStart; clump->tStart = clump->tEnd = hit->tStart; for (hit = hit->next; hit != NULL; hit = hit->next) { - x = hit->qStart; + gfOffset x = hit->qStart; if (x < clump->qStart) clump->qStart = x; if (x > clump->qEnd) clump->qEnd = x; x = hit->tStart; if (x < clump->tStart) clump->tStart = x; if (x > clump->tEnd) clump->tEnd = x; } clump->tEnd += tileSize; clump->qEnd += tileSize; } static void targetClump(struct genoFind *gf, struct gfClump **pClumpList, struct gfClump *clump) /* Add target sequence to clump. If clump had multiple targets split it into * multiple clumps, one per target. Add clump(s) to list. */ { struct gfSeqSource *ss = findSource(gf, clump->tStart); @@ -1445,58 +1444,58 @@ } static struct gfHit *gfFastFindDnaHits(struct genoFind *gf, struct dnaSeq *seq, Bits *qMaskBits, gfOffset qMaskOffset, struct lm *lm, int *retHitCount, struct gfSeqSource *target, gfOffset tMin, gfOffset tMax) /* Find hits associated with one sequence. This is is special fast * case for DNA that is in an unsegmented index. */ { struct gfHit *hitList = NULL, *hit; gfOffset size = seq->size; int tileSizeMinusOne = gf->tileSize - 1; int mask = gf->tileMask; DNA *dna = seq->dna; int i, j; -gfOffset bits = 0; -gfOffset bVal; +bits32 bits = 0; +bits32 bVal; int listSize; gfOffset qStart, *tList; int hitCount = 0; for (i=0; i<tileSizeMinusOne; ++i) { bVal = ntValNoN[(int)dna[i]]; bits <<= 2; bits += bVal; } for (i=tileSizeMinusOne; i<size; ++i) { bVal = ntValNoN[(int)dna[i]]; bits <<= 2; bits += bVal; bits &= mask; listSize = gf->listSizes[bits]; if (listSize != 0) { qStart = i-tileSizeMinusOne; if (qMaskBits == NULL || bitCountRange(qMaskBits, qStart+qMaskOffset, gf->tileSize) == 0) { tList = gf->lists[bits]; for (j=0; j<listSize; ++j) { - int tStart = tList[j]; + gfOffset tStart = tList[j]; if (target == NULL || (target == findSource(gf, tStart) && tStart >= tMin && tStart < tMax) ) { lmAllocVar(lm, hit); hit->qStart = qStart; hit->tStart = tStart; hit->diagonal = tStart + size - qStart; slAddHead(&hitList, hit); ++hitCount; } } } } } *retHitCount = hitCount; @@ -1652,31 +1651,31 @@ *retHitCount = hitCount; return hitList; } static struct gfHit *gfSegmentedFindHits(struct genoFind *gf, aaSeq *seq, Bits *qMaskBits, int qMaskOffset, struct lm *lm, int *retHitCount, struct gfSeqSource *target, int tMin, int tMax) /* Find hits associated with one sequence in general case in a segmented * index. */ { struct gfHit *hitList = NULL, *hit; int size = seq->size; int tileSize = gf->tileSize; int tileTailSize = gf->segSize; int tileHeadSize = gf->tileSize - tileTailSize; -int lastStart = size - tileSize; +gfOffset lastStart = size - tileSize; char *poly = seq->dna; int i, j; int tileHead, tileTail; int listSize; gfOffset qStart; struct endList *endList; int hitCount = 0; int (*makeTile)(char *poly, int n) = (gf->isPep ? gfPepTile : gfDnaTile); initNtLookup(); for (i=0; i<=lastStart; ++i) { if (qMaskBits == NULL || bitCountRange(qMaskBits, i+qMaskOffset, tileSize) == 0) {