2028f58f234220d59b228639ff4e4ead0d83d2c0
aamp
  Tue May 17 15:03:28 2011 -0700
Stuff to do with microarray subsetting.  It might need a little smoothing over
diff --git src/hg/inc/microarray.h src/hg/inc/microarray.h
index 1a2249c..5630086 100644
--- src/hg/inc/microarray.h
+++ src/hg/inc/microarray.h
@@ -147,36 +147,54 @@
     struct maGrouping *defaultCombine;
     };
 
 void maGroupingFree(struct maGrouping **pMag);
 /* free up a maGrouping */
 
 void maGroupingFreeList(struct maGrouping **pList);
 /* Free up a list of maGroupings. */
 
 void microarrayGroupsFree(struct microarrayGroups **pGroups);
 /* Free up the microarrayGroups struct. */
 
 struct microarrayGroups *maGetTrackGroupings(char *database, struct trackDb *tdb);
 /* Get the settings from the .ra files and put them in a convenient struct. */
 
+struct maGrouping *maGetGrouping(struct microarrayGroups *groupings, char *name);
+/* Return the specfic grouping (combine or subset), or NULL if not found */
+
 struct maGrouping *maGetGroupingFromCt(struct customTrack *ct);
 /* Spoof an "all" maGrouping from a customTrack. */
 
 struct bed *ctLoadMultScoresBedDb(struct customTrack *ct, char *chrom, int start, int end);
 /* If the custom track is stored in a database, load it. */
 
 struct maGrouping *maCombineGroupingFromCart(struct microarrayGroups *groupings, 
 					     struct cart *cart, char *trackName);
 /* Determine which grouping to use based on the cart status or lack thereof. */
 
-void maBedClumpGivenGrouping(struct bed *bedList, struct maGrouping *grouping);
+struct maGrouping *maSubsetGroupingFromCart(struct microarrayGroups *groupings, 
+					     struct cart *cart, char *trackName);
+/* Determine which subsetting to use based on the cart status or lack thereof. */
+
+int maSubsetOffsetFromCart(struct maGrouping *subset, struct cart* cart, char *trackName);
+
+void maBedClumpGivenGrouping(struct bed *bedList, struct maGrouping *grouping, 
+			     struct maGrouping *subset, int subsetOffset);
 /* Clump (mean/median) a bed 15 given the grouping kind. */
 
 struct maGrouping *maHashToMaGrouping(struct hash *oneGroup);
 /* This converts a single "stanza" of the microarrayGroups.ra file to a
    maGrouping struct. */
 
 enum expColorType getExpColorType(char *colorScheme);
 /* From a color type return the respective enum. */
 
+/* Linking to UI options... */
+
+char *expRatioCombineDLName(char *trackName);
+
+char *expRatioSubsetRadioName(char *trackName, struct microarrayGroups *groupings);
+
+char *expRatioSubsetDLName(char *trackName, struct maGrouping *group);
+
 #endif