src/hg/instinct/hgGeneset/hgGenesets.h 1.2
1.2 2010/01/21 23:51:13 jsanborn
added initial drawing code
Index: src/hg/instinct/hgGeneset/hgGenesets.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/hgGeneset/hgGenesets.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 1000000 -r1.1 -r1.2
--- src/hg/instinct/hgGeneset/hgGenesets.h 19 Jan 2010 23:05:15 -0000 1.1
+++ src/hg/instinct/hgGeneset/hgGenesets.h 21 Jan 2010 23:51:13 -0000 1.2
@@ -1,45 +1,89 @@
/* */
#ifndef HGGENESETS_H
#define HGGENESETS_H
#define MAX_NUM_RESPONSE 100 // maximum number of objects in JSON response
#include "cart.h"
-#define DEBUG 0
+#define DEBUG 1
+#define VERSION "0.1"
/*** Prefixes for variables in cart we don't share with other apps. ***/
#define bioIntPrefix "hgg_"
#define hghDo hghPrefix "do"
#define hghTableName hghPrefix "tableName"
/*** Our various cart variables. ***/
#define hghHeatmap hghPrefix "heatmap"
#define hghDataSet hghPrefix "dataset"
#define hghDisplayType hghPrefix "display"
#define hghGhName hghPrefix "ghName"
#define hghMaxGapToFill hghPrefix "maxGapToFill"
#define hghImageWidth hghPrefix "imageWidth"
#define hghDataConfigPrefix hghPrefix "data_"
/** 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 hgh3Prefix "hgh3_"
+#define hgh3Mode hgh3Prefix "mode"
+#define hgh3DatasetId hgh3Prefix "dataset"
+#define hgh3SampleIds hgh3Prefix "samples"
+#define hgh3FeatureIds hgh3Prefix "features"
+
/* ---- 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;
+
+ int x_scale;
+ int y_scale;
+
+ struct rgbColor *low;
+ struct rgbColor *zero;
+ struct rgbColor *high;
+ struct rgbColor *missing;
+
+ struct hash *x_index;
+ struct hash *y_index;
+};
+
+struct mapSettings *initMapSettings(struct slName *samples, struct slName *features,
+ int x_scale, int y_scale);
+
+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 */