2cdc0e88d6a20bc08e43fdecc2a8212b5aa132dd
angie
  Fri May 6 15:27:50 2011 -0700
Feature #2823 (VCF track handler): removing some code that won't be used.
diff --git src/hg/hgTracks/vcfTrack.c src/hg/hgTracks/vcfTrack.c
index 9218d87..5b41470 100644
--- src/hg/hgTracks/vcfTrack.c
+++ src/hg/hgTracks/vcfTrack.c
@@ -6,54 +6,33 @@
 #include "errCatch.h"
 #include "hacTree.h"
 #include "hdb.h"
 #include "hgTracks.h"
 #include "pgSnp.h"
 #include "trashDir.h"
 #include "vcf.h"
 #if (defined USE_TABIX && defined KNETFILE_HOOKS)
 #include "knetUdc.h"
 #include "udc.h"
 #endif//def USE_TABIX && KNETFILE_HOOKS
 
 #ifdef USE_TABIX
 
 //#*** TODO: use trackDb/cart setting or something
-static boolean boringBed = FALSE;
 static boolean doHapClusterDisplay = TRUE;
 static boolean colorHapByRefAlt = TRUE;
 
-static struct bed4 *vcfFileToBed4(struct vcfFile *vcff)
-/* Convert vcff's records to bed4; don't free vcff until you're done with bed4
- * because bed4 contains pointers into vcff's records' chrom and name. */
-{
-struct bed4 *bedList = NULL;
-struct vcfRecord *rec;
-for (rec = vcff->records;  rec != NULL;  rec = rec->next)
-    {
-    struct bed4 *bed;
-    AllocVar(bed);
-    bed->chrom = rec->chrom;
-    bed->chromStart = rec->chromStart;
-    bed->chromEnd = rec->chromEnd;
-    bed->name = rec->name;
-    slAddHead(&bedList, bed);
-    }
-slReverse(&bedList);
-return bedList;
-}
-
 #define VCF_MAX_ALLELE_LEN 80
 
 static struct pgSnp *vcfFileToPgSnp(struct vcfFile *vcff)
 /* Convert vcff's records to pgSnp; don't free vcff until you're done with pgSnp
  * because it contains pointers into vcff's records' chrom. */
 {
 struct pgSnp *pgsList = NULL;
 struct vcfRecord *rec;
 struct dyString *dy = dyStringNew(0);
 for (rec = vcff->records;  rec != NULL;  rec = rec->next)
     {
     struct pgSnp *pgs;
     AllocVar(pgs);
     pgs->chrom = rec->chrom;
     pgs->chromStart = rec->chromStart;
@@ -518,51 +497,46 @@
 if (errCatchStart(errCatch))
     {
     vcff = vcfTabixFileMayOpen(fileOrUrl, chromName, winStart, winEnd, vcfMaxErr);
     }
 errCatchEnd(errCatch);
 if (errCatch->gotError)
     {
     if (isNotEmpty(errCatch->message->string))
 	tg->networkErrMsg = cloneString(errCatch->message->string);
     tg->drawItems = bigDrawWarning;
     tg->totalHeight = bigWarnTotalHeight;
     }
 errCatchFree(&errCatch);
 if (vcff != NULL)
     {
-    if (boringBed)
-	tg->items = vcfFileToBed4(vcff);
-    else if (doHapClusterDisplay && vcff->genotypeCount > 0 && vcff->genotypeCount < 3000 &&
+    if (doHapClusterDisplay && vcff->genotypeCount > 0 && vcff->genotypeCount < 3000 &&
 	     (tg->visibility == tvPack || tg->visibility == tvSquish))
 	vcfHapClusterOverloadMethods(tg, vcff);
     else
 	{
 	tg->items = vcfFileToPgSnp(vcff);
-	/* base coloring/display decision on count of items */
+	// pgSnp bases coloring/display decision on count of items:
 	tg->customInt = slCount(tg->items);
 	}
     // Don't vcfFileFree here -- we are using its string pointers!
     }
 }
 
 void vcfTabixMethods(struct track *track)
 /* Methods for VCF + tabix files. */
 {
-if (boringBed == TRUE)
-    bedMethods(track);
-else
     pgSnpMethods(track);
 track->loadItems = vcfTabixLoadItems;
 track->canPack = TRUE;
 }
 
 #else // no USE_TABIX:
 
 // If code was not built with USE_TABIX=1, but there are vcfTabix tracks, display a message
 // in place of the tracks (instead of annoying "No track handler" warning messages).
 
 static void drawUseVcfTabixWarning(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg,
 				   int xOff, int yOff, int width, MgFont *font, Color color,
 				   enum trackVisibility vis)
 /* Draw a message saying that the code needs to be built with USE_TABIX=1. */
 {