2a98edb9581c24d22bc2319496ee2ebaa9fbee96 kent Thu Apr 11 14:08:20 2013 -0700 Adding twoBitTotalSizeNoN. diff --git src/lib/twoBit.c src/lib/twoBit.c index 5cdd0b3..1026bdb 100644 --- src/lib/twoBit.c +++ src/lib/twoBit.c @@ -1199,15 +1199,28 @@ nSizes[i] = byteSwap32(nSizes[i]); } } for (i=0; i<nBlockCount; ++i) { size -= nSizes[i]; } freez(&nStarts); freez(&nSizes); } 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; +}