ee9a6c5c63eba2d963a5d7581185b1004fffe964
angie
  Mon Apr 15 14:06:10 2013 -0700
Added indentifying name to annoStreamer for output header info and better error messages. refs #6152
diff --git src/lib/annoStreamer.c src/lib/annoStreamer.c
index d86e111..837e417 100644
--- src/lib/annoStreamer.c
+++ src/lib/annoStreamer.c
@@ -48,54 +48,58 @@
 
 struct annoFilter *annoStreamerGetFilters(struct annoStreamer *self)
 /* Return supported filters with current settings.  Callers can modify and free when done. */
 {
 return annoFilterCloneList(self->filters);
 }
 
 void annoStreamerSetFilters(struct annoStreamer *self, struct annoFilter *newFilters)
 /* Free old filters and use clone of newFilters. */
 {
 annoFilterFreeList(&(self->filters));
 self->filters = annoFilterCloneList(newFilters);
 }
 
 void annoStreamerInit(struct annoStreamer *self, struct annoAssembly *assembly,
-		      struct asObject *asObj)
+		      struct asObject *asObj, char *name)
 /* 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 then initialize their private data. */
 {
 self->assembly = assembly;
 self->getAutoSqlObject = annoStreamerGetAutoSqlObject;
 self->setAutoSqlObject = annoStreamerSetAutoSqlObject;
 self->setRegion = annoStreamerSetRegion;
 self->getHeader = annoStreamerGetHeader;
 self->getFilters = annoStreamerGetFilters;
 self->setFilters = annoStreamerSetFilters;
 self->positionIsGenome = TRUE;
 self->setAutoSqlObject(self, asObj);
+if (name == NULL)
+    errAbort("annoStreamerInit: need non-NULL name");
+self->name = cloneString(name);
 }
 
 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. */
 {
 if (pSelf == NULL)
     return;
 struct annoStreamer *self = *pSelf;
+freez(&(self->name));
 freez(&(self->chrom));
 annoFilterFreeList(&(self->filters));
 freez(pSelf);
 }
 
 INLINE boolean findColumn(struct asColumn *columns, char *name, int *retIx, char **retName)
 /* Scan columns for name.
  * If found, set retIx to column index, set retName to clone of name, and return TRUE.
  * If not found, set retIx to -1, set retName to NULL, and return FALSE; */
 {
 int ix = asColumnFindIx(columns, name);
 if (retIx != NULL)
     *retIx = ix;
 if (retName != NULL)
     {