src/hg/hgTracks/simpleTracks.c 1.89

1.89 2009/07/06 19:00:49 tdreszer
Added filterBy using 'score' so that ENCODE NHGRI BiPs can filter on annotations
Index: src/hg/hgTracks/simpleTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/simpleTracks.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -b -B -U 4 -r1.88 -r1.89
--- src/hg/hgTracks/simpleTracks.c	26 Jun 2009 20:14:45 -0000	1.88
+++ src/hg/hgTracks/simpleTracks.c	6 Jul 2009 19:00:49 -0000	1.89
@@ -1808,9 +1808,11 @@
     scoreColumn = "score";
 
 struct dyString *extraWhere = newDyString(128);
 boolean and = FALSE;
-extraWhere = dyAddFilterAsInt(cart,tdb,extraWhere,SCORE_FILTER,"0:1000",scoreColumn,&and);
+extraWhere = dyAddFilterByClause(cart,tdb,extraWhere,"score",&and);
+if(and == FALSE) // Cannot have both 'filterBy' score and 'scoreFilter'
+    extraWhere = dyAddFilterAsInt(cart,tdb,extraWhere,SCORE_FILTER,"0:1000",scoreColumn,&and);
 if (sameString(extraWhere->string, ""))
     return NULL;
 return dyStringCannibalize(&extraWhere);
 }