src/hg/instinct/hgGeneset/hgGenesets.h 1.9
1.9 2010/01/31 02:45:46 jsanborn
added sorting
Index: src/hg/instinct/hgGeneset/hgGenesets.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgGeneset/hgGenesets.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -B -U 1000000 -r1.8 -r1.9
--- src/hg/instinct/hgGeneset/hgGenesets.h 31 Jan 2010 01:17:07 -0000 1.8
+++ src/hg/instinct/hgGeneset/hgGenesets.h 31 Jan 2010 02:45:46 -0000 1.9
@@ -1,133 +1,140 @@
/* */
#ifndef HGGENESETS_H
#define HGGENESETS_H
#define MAX_NUM_RESPONSE 100 // maximum number of objects in JSON response
#include "cart.h"
#include "bioIntDb.h"
#include "bioIntDriver.h"
#define DEBUG 1
#define VERSION "0.1"
/*** Prefixes for variables in cart we don't share with other apps. ***/
#define hghPrefix "hgg_"
#define hghDo hghPrefix "do"
#define hghTableName hghPrefix "tableName"
/*** Our various cart variables. ***/
#define hghHeatmap hghPrefix "heatmap"
-#define hghDataSet hghPrefix "dataset"
+//#define hghDataSet hghPrefix "dataset"
#define hghDisplayType hghPrefix "display"
#define hghGhName hghPrefix "ghName"
#define hghMaxGapToFill hghPrefix "maxGapToFill"
#define hghImageWidth hghPrefix "imageWidth"
#define hghDataConfigPrefix hghPrefix "data_"
#define hghMode hghPrefix "mode"
#define hghCohortId hghPrefix "cohort"
#define hghDatasetId hghPrefix "dataset"
#define hghSampleIds hghPrefix "samples"
#define hghFeatureIds hghPrefix "features"
#define hghWidth hghPrefix "width"
#define hghHeight hghPrefix "height"
-#define hghClusterMethod hghPrefix "cmethod"
-#define hghClusterMetric hghPrefix "cmetric"
#define hghGetFirst hghPrefix "getfirst"
#define hghSearchTerm hghPrefix "searchTerm"
+#define hghClusterPrefix hghPrefix "cluster"
+#define hghClusterMethod hghClusterPrefix "Method"
+#define hghClusterMetric hghClusterPrefix "Metric"
+
#define hghInfoPrefix hghPrefix "info"
#define hghInfoName hghInfoPrefix "Name"
#define hghInfoType hghInfoPrefix "Type"
#define hghInfoId hghInfoPrefix "Id"
+#define hghSortPrefix hghPrefix "sort"
+#define hghSortFeatureId hghSortPrefix "FeatureId"
+#define hghSortSampleId hghSortPrefix "SampleId"
+#define hghSortDir hghSortPrefix "Dir"
+
/** Commands from Javascript client **/
#define bioIntPrefix "hgg_"
/* Obtaining Heatmaps */
#define bioIntMode bioIntPrefix "mode"
#define bioIntFeature bioIntPrefix "feature"
#define bioIntCohortId bioIntPrefix "cohort_id"
#define bioIntAnalysisId bioIntPrefix "analysis_id"
#define bioIntFeatureId bioIntPrefix "feature_id"
#define bioIntFeatureName bioIntPrefix "feature_name"
#define bioIntTakeTop bioIntPrefix "take_top"
#define bioIntSourceName bioIntPrefix "source"
#define DEFAULT_HEATMAP_WIDTH 500
#define DEFAULT_HEATMAP_HEIGHT 500
/* ---- Global variables declared in hgHeatmap.c */
extern struct cart *cart; /* This holds cgi and other variables between clicks. */
struct rawData {
struct rawData *next;
int sample_id;
int feature_id;
double val;
double conf;
};
struct mapSettings {
double gain;
double max_deviation;
int width;
int height;
MgFont *font;
int fontHeight;
double hm_x_scale;
double hm_y_scale;
int hm_x;
int hm_y;
int hm_width;
int hm_height;
double thumb_x_scale;
double thumb_y_scale;
int thumb_x;
int thumb_y;
int thumb_width;
int thumb_height;
struct rgbColor *low;
struct rgbColor *zero;
struct rgbColor *high;
struct rgbColor *missing;
struct hash *x_index;
struct hash *y_index;
struct hash *sampleHash;
struct hash *featureHash;
};
struct hmPixel {
struct hmPixel *next;
int x;
int y;
int w;
int h;
double val;
int count;
};
struct mapSettings *initMapSettings(struct slName *saList, struct slName *feList,
struct samples *samples, struct analysisFeatures *features,
int width, int height);
char *heatmapGif(struct sqlConnection *conn, struct rawData *rdList,
struct mapSettings *settings);
void trashDirMD5File(struct tempName *tn, char *dirName, char *suffix, char *strToHash);
#endif /* HGGENESETS_H */