1d59c79ebf8d7596cf0beed61419bb267d5efb5c
angie
  Wed Dec 19 15:37:45 2012 -0800
Adding annoStreamTab and simple test case.refs #6152
Performance will not be good for a series of queries to small regions
on the same chromosome, because even if the regions don't overlap, we
will have to reopen the file every time and start over just in case
there are some items that start to the left of the region but overlap
it.
To fix that, we could add a queue for use when the region is smaller
than a chromosome.  Items that end to the right of the region would be
kept in a queue in case they're needed in the next region query.  When
a new sub-chrom region query begins, if there are items in the queue
that overlap the new region, they are used first and then we start
reading from the file where we left off at the end of the last region.

diff --git src/inc/annoStreamer.h src/inc/annoStreamer.h
index e2cf8f1..a2bc66d 100644
--- src/inc/annoStreamer.h
+++ src/inc/annoStreamer.h
@@ -92,16 +92,24 @@
 /* Free old columns and use clone of newColumns. */
 
 void annoStreamerInit(struct annoStreamer *self, struct asObject *asObj);
 /* Initialize a newly allocated annoStreamer with default annoStreamer methods and
  * default filters and columns based on asObj.
  * In general, subclasses' constructors will call this first; override nextRow, close,
  * and probably setRegion and setQuery; and then initialize their private data. */
 
 void annoStreamerFree(struct annoStreamer **pSelf);
 /* Free self. This should be called at the end of subclass close methods, after
  * subclass-specific connections are closed and resources are freed. */
 
 void annoStreamerSetQuery(struct annoStreamer *self, struct annoGratorQuery *query);
 /* Set query (to be called only by annoGratorQuery which is created after streamers). */
 
+boolean annoStreamerFindBed3Columns(struct annoStreamer *self,
+			    int *retChromIx, int *retStartIx, int *retEndIx,
+			    char **retChromField, char **retStartField, char **retEndField);
+/* Scan autoSql for recognized column names corresponding to BED3 columns.
+ * Set ret*Ix to list index of each column if found, or -1 if not found.
+ * Set ret*Field to column name if found, or NULL if not found.
+ * If all three are found, return TRUE; otherwise return FALSE. */
+
 #endif//ndef ANNOSTREAMER_H