527428fffb4613aff49b19580e90b8e66ee99204
angie
  Mon Apr 15 12:36:13 2013 -0700
Ripping out unused annoColumn -- it's really an output option for tab-sep or CT output and could simply be an slName list. refs #6152
diff --git src/lib/annoFormatTab.c src/lib/annoFormatTab.c
index c4a2243..bceb981 100644
--- src/lib/annoFormatTab.c
+++ src/lib/annoFormatTab.c
@@ -13,41 +13,39 @@
     };
 
 static void printHeaderColumns(FILE *f, struct annoStreamer *source, boolean isFirst)
 /* Print names of included columns from this source. */
 {
 if (source->rowType == arWig)
     {
     // Fudge in the row's chrom, start, end as output columns even though they're not in autoSql
     if (isFirst)
 	{
 	fputs("#chrom", f);
 	isFirst = FALSE;
 	}
     fputs("\tstart\tend", f);
     }
-struct annoColumn *col;
+struct asColumn *col;
 int i;
-for (col = source->columns, i = 0;  col != NULL;  col = col->next, i++)
+for (col = source->asObj->columnList, i = 0;  col != NULL;  col = col->next, i++)
     {
-    if (! col->included)
-	continue;
     if (isFirst && i == 0)
 	fputc('#', f);
     else
 	fputc('\t', f);
-    fputs(col->def->name, f);
+    fputs(col->name, f);
     }
 }
 
 static void aftInitialize(struct annoFormatter *vSelf, struct annoStreamer *primary,
 			  struct annoStreamer *integrators)
 /* Print header, regardless of whether we get any data after this. */
 {
 struct annoFormatTab *self = (struct annoFormatTab *)vSelf;
 if (self->needHeader)
     {
     char *primaryHeader = primary->getHeader(primary);
     if (isNotEmpty(primaryHeader))
 	fprintf(self->f, "# Header from primary input:\n%s", primaryHeader);
     printHeaderColumns(self->f, primary, TRUE);
     struct annoStreamer *grator;
@@ -132,36 +130,34 @@
 char **words = wordsFromRow(row, streamer, &freeWhenDone);
 if (streamer->rowType == arWig)
     {
     // Fudge in the row's chrom, start, end as output columns even though they're not in autoSql
     if (isFirst)
 	{
 	if (row != NULL)
 	    fputs(row->chrom, f);
 	isFirst = FALSE;
 	}
     if (row != NULL)
 	fprintf(f, "\t%u\t%u", row->start, row->end);
     else
 	fputs("\t\t", f);
     }
-struct annoColumn *col;
+int colCount = slCount(streamer->asObj->columnList);
 int i;
-for (col = streamer->columns, i = 0;  col != NULL;  col = col->next, i++)
+for (i = 0;  i < colCount;  i++)
     {
-    if (! col->included)
-	continue;
     if (!isFirst || i > 0)
 	fputc('\t', f);
     if (words != NULL)
 	fputs((words[i] ? words[i] : ""), f);
     }
 if (freeWhenDone)
     {
     freeMem(words[0]);
     freeMem(words);
     }
 }
 
 static void aftFormatOne(struct annoFormatter *vSelf, struct annoStreamRows *primaryData,
 			 struct annoStreamRows *gratorData, int gratorCount)
 /* Print out tab-separated columns that we have gathered in prior calls to aftCollect,