dbb7cbfd254794919a8e491cc3d3eb7c6009ba15
angie
  Tue Jan 25 14:58:05 2011 -0800
Track #1684 (SNPs 132 (dbSNP)): Added new coloring and filtering optionsfor new columns exceptions and bitfields.  Fixed remaining hardcoded cart
var names to use track name, keeping backwards compat with old sessions.
Lots of refactoring -- got rid of snp125Extended business (mostly so I
wouldn't have to make a snp132Extended); color is stored in snp->weight
now, and extraName stuff overwrites name.  Added new color-sorting in
squish mode so the most interesting SNPs appear at the top.  Also added
new trackDb var defaultMaxWeight for the NonUnique subset (so its items
aren't invisible by default).

diff --git src/hg/lib/snp125.c src/hg/lib/snp125.c
index 97677b1..ba9cf82 100644
--- src/hg/lib/snp125.c
+++ src/hg/lib/snp125.c
@@ -266,60 +266,30 @@
 int snp125Cmp(const void *va, const void *vb)
 {
 const struct snp125 *a = *((struct snp125 **)va);
 const struct snp125 *b = *((struct snp125 **)vb);
 int dif;
 dif = strcmp(a->chrom, b->chrom);
 if (dif == 0)
     dif = a->chromStart - b->chromStart;
 return dif;
 }
 
 
 /*  Additional function for extended processing */
 
 
-struct snp125Extended *snp125ExtendedLoad(char **row)
-/* Load a snp125 from row fetched with select * from snp125
- * from database.  Additional fields are for run-time calculations */
-{
-struct snp125Extended *ret;
-
-AllocVar(ret);
-ret->chrom = cloneString(row[0]);
-ret->chromStart = sqlUnsigned(row[1]);
-ret->chromEnd = sqlUnsigned(row[2]);
-ret->name = cloneString(row[3]);
-ret->score = sqlUnsigned(row[4]);
-ret->strand = cloneString(row[5]);
-ret->refNCBI = cloneString(row[6]);
-ret->refUCSC = cloneString(row[7]);
-ret->observed = cloneString(row[8]);
-ret->molType = cloneString(row[9]);
-ret->class = cloneString(row[10]);
-ret->valid = cloneString(row[11]);
-ret->avHet = atof(row[12]);
-ret->avHetSE = atof(row[13]);
-ret->func = cloneString(row[14]);
-ret->locType = cloneString(row[15]);
-ret->weight = sqlUnsigned(row[16]);
-ret->nameExtra = cloneString("");
-ret->color = 0;
-
-return ret;
-}
-
 struct snp125Extended *snpExtendedLoad(char **row)
 /* Load a snp125 from row fetched with select * from snp125
  * from database.  Additional fields are for run-time calculations */
 {
 struct snp125Extended *ret;
 
 AllocVar(ret);
 ret->chrom = cloneString(row[0]);
 ret->chromStart = sqlUnsigned(row[1]);
 ret->chromEnd = sqlUnsigned(row[2]);
 ret->name = cloneString(row[3]);
 ret->score = sqlUnsigned(row[4]);
 ret->strand = cloneString(row[5]);
 ret->observed = cloneString(row[6]);
 ret->molType = cloneString(row[7]);