a345d17f7912a5f0e121951f6d261b496cce608b braney Fri May 10 09:25:54 2013 -0700 first cut at track item search in track hubs that have bigBed files with a searchIndex field refs #10426 diff --git src/lib/twoBit.c src/lib/twoBit.c index 1026bdb..d8ba582 100644 --- src/lib/twoBit.c +++ src/lib/twoBit.c @@ -1212,15 +1212,28 @@ return(size); } long long twoBitTotalSizeNoN(struct twoBitFile *tbf) /* return the size of the all the sequence in file, not counting N's*/ { struct twoBitIndex *index; long long totalSize = 0; for (index = tbf->indexList; index != NULL; index = index->next) { int size = twoBitSeqSizeNoNs(tbf, index->name); totalSize += size; } return totalSize; } + +boolean twoBitIsSequence(struct twoBitFile *tbf, char *chromName) +/* Return TRUE if chromName is in 2bit file. */ +{ +struct twoBitIndex *index; + +for (index = tbf->indexList; index != NULL; index = index->next) + { + if (sameString(index->name, chromName)) + return TRUE; + } +return FALSE; +}