be07e4273228ea43ed8f24dc076af4a633e7916f
kent
  Sun Jul 3 14:58:45 2022 -0700
Adding twoBitHasSeq function to query if a sequence exists in file.

diff --git src/inc/twoBit.h src/inc/twoBit.h
index 83d4534..1ba50f6 100644
--- src/inc/twoBit.h
+++ src/inc/twoBit.h
@@ -83,30 +83,33 @@
 /* Read in header and index.  
  * Squawk and die if there is a problem. */
 
 struct twoBitFile *twoBitOpen(char *fileName);
 /* Open file, read in header and index.  
  * Squawk and die if there is a problem. */
 
 struct twoBitFile *twoBitOpenExternalBptIndex(char *twoBitName, char *bptName);
 /* Open file, read in header, but not regular index.  Instead use
  * bpt index.   Beware if you use this the indexList field will be NULL
  * as will the hash. */
 
 void twoBitClose(struct twoBitFile **pTbf);
 /* Free up resources associated with twoBitFile. */
 
+boolean twoBitHasSeq(struct twoBitFile *tbf, char *name);
+/* Return TRUE if sequence of given name exists in two bit file */
+
 int twoBitSeqSize(struct twoBitFile *tbf, char *name);
 /* Return size of sequence in two bit file in bases. */
 
 long long twoBitTotalSize(struct twoBitFile *tbf);
 /* Return total size of all sequences in two bit file. */
 
 struct dnaSeq *twoBitReadSeqFragExt(struct twoBitFile *tbf, char *name,
                                     int fragStart, int fragEnd, boolean doMask, int *retFullSize);
 /* Read part of sequence from .2bit file.  To read full
  * sequence call with start=end=0.  Sequence will be lower
  * case if doMask is false, mixed case (repeats in lower)
  * if doMask is true. */
 
 struct dnaSeq *twoBitReadSeqFrag(struct twoBitFile *tbf, char *name,
 	int fragStart, int fragEnd);