491395482b817cfe82cbdef4dd7f8ee0723c1a4a
angie
  Wed Mar 23 21:01:49 2011 -0700
Feature #2822, #2823 (VCF customFactory + track handler):Added a new track type, vcfTabix, with handlers in hgTracks and hgc
and a customFactory.  It is a new bigDataUrl type of track; the
remote VCF file must be compressed and indexed by tabix, so like
BAM a separate index file is required.  If the VCF file has
genotypes, then each sample's two haplotypes are graphed in a
line, with one line per sample.  Otherwise, alleles and counts
(if available) are drawn using Belinda's pgSnp methods.
The source code has to be compiled with USE_TABIX=1 (which is
automatically set for us by common.mk when it finds the local
installation) in order for the CGIs to recognize the track type.

diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index 873077c..1b2d51f 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -387,30 +387,31 @@
 extern boolean withLeftLabels;		/* Display left labels? */
 extern boolean withCenterLabels;	/* Display center labels? */
 extern boolean withPriorityOverride;    /* enable track reordering? */
 extern boolean revCmplDisp;             /* reverse-complement display */
 extern boolean measureTiming;	/* Flip this on to display timing
                                  * stats on each track at bottom of page. */
 
 extern struct hash *hgFindMatches; /* The matches found by hgFind that should be highlighted. */
 
 extern int maxShade;		  /* Highest shade in a color gradient. */
 extern Color shadesOfGray[10+1];  /* 10 shades of gray from white to black
                                    * Red is put at end to alert overflow. */
 extern Color shadesOfBrown[10+1]; /* 10 shades of brown from tan to tar. */
 extern struct rgbColor guidelineColor;
 extern struct rgbColor undefinedYellowColor;
+extern Color darkGreenColor;
 
 extern Color shadesOfSea[10+1];       /* Ten sea shades. */
 
 /* 16 shades from black to fully saturated of red/green/blue for
  * expression data. */
 #define EXPR_DATA_SHADES 16
 extern Color shadesOfGreen[EXPR_DATA_SHADES];
 extern Color shadesOfRed[EXPR_DATA_SHADES];
 extern Color shadesOfBlue[EXPR_DATA_SHADES];
 extern Color shadesOfYellow[EXPR_DATA_SHADES];
 
 extern Color shadesOfGreenOnWhite[EXPR_DATA_SHADES];
 extern Color shadesOfRedOnWhite[EXPR_DATA_SHADES];
 extern Color shadesOfBlueOnWhite[EXPR_DATA_SHADES];
 extern Color shadesOfYellowOnWhite[EXPR_DATA_SHADES];
@@ -784,30 +785,33 @@
 /* Make track group for snake alignment. */
 
 void chainMethods(struct track *track, struct trackDb *tdb,
                                 int wordCount, char *words[]);
 /* Make track group for chain alignment. */
 
 void netMethods(struct track *tg);
 /* Make track group for chain/net alignment. */
 
 void mafMethods(struct track *tg);
 /* Make track group for maf multiple alignment. */
 
 void bamMethods(struct track *track);
 /* Methods for BAM alignment files. */
 
+void vcfTabixMethods(struct track *track);
+/* Methods for Variant Call Format compressed & indexed by tabix. */
+
 void altGraphXMethods(struct track *tg);
 /* setup special methods for altGraphX track */
 
 void wabaMethods(struct track *tg);
 /* Return track with fields shared by waba-based
  * alignment tracks filled in. */
 
 void axtMethods(struct track *tg, char *otherDb);
 /* Make track group for axt alignments. */
 
 void repeatMethods(struct track *tg);
 /* Make track for repeats. */
 
 void affyTransfragsMethods(struct track *tg);
 /* Substitute a new load method that filters based on score. Also add
@@ -1245,45 +1249,50 @@
 void registerTrackHandler(char *name, TrackHandler handler);
 /* Register a track handling function. */
 
 void doSearchTracks(struct group *groupList);
 
 boolean superTrackHasVisibleMembers(struct trackDb *tdb);
 
 enum trackVisibility limitedVisFromComposite(struct track *subtrack);
 /* returns the subtrack visibility which may be limited by composite with multi-view dropdowns. */
 
 char *getScoreFilterClause(struct cart *cart,struct trackDb *tdb,char *scoreColumn);
 // Returns "score >= ..." extra where clause if one is needed
 
 #define SMALLBUF 128
 
-char *bbiNameFromSettingOrTable(struct trackDb *tdb, struct sqlConnection *conn, char *table);
-/* Return file name from little table. */
-
 char *trackUrl(char *mapName, char *chromName);
 /* Return hgTrackUi url; chromName is optional. */
 
 void bedDetailCtMethods (struct track *tg, struct customTrack *ct);
 /* Load bedDetail track from custom tracks as bed or linked features */
 
+void pgSnpMethods (struct track *tg);
+/* Personal Genome SNPs: show two alleles with stacked color bars for base alleles and
+ * (if available) allele counts in mouseover. */
+
 void pgSnpCtMethods (struct track *tg);
 /* Load pgSnp track from custom tracks */
 
 void gvfMethods(struct track *tg);
 /* Load GVF variant data. */
 
+void messageLineMethods(struct track *track);
+/* Methods for drawing a single-height message line instead of track items,
+ * e.g. if source was compiled without a necessary library. */
+
 void parentChildCartCleanup(struct track *trackList,struct cart *newCart,struct hash *oldVars);
 /* When composite/view settings changes, remove subtrack specific vis
    When superTrackChild is found and selected, shape superTrack to match. */
 
 void dontLoadItems(struct track *tg);
 /* No-op loadItems when we aren't going to try. */
 
 //#define REMOTE_TRACK_AJAX_CALLBACK
 #ifdef REMOTE_TRACK_AJAX_CALLBACK
 #define REMOTE_TRACK_HEIGHT (tl.fontHeight*2)
 
 boolean trackShouldUseAjaxRetrieval(struct track *track);
 /* Tracks with remote data sources should berendered via an ajax callback */
 
 #else//ifndef