src/hg/instinct/hgBamBam/hgBamBam.h 1.1
1.1 2010/05/25 20:22:45 jsanborn
initial commit
Index: src/hg/instinct/hgBamBam/hgBamBam.h
===================================================================
RCS file: src/hg/instinct/hgBamBam/hgBamBam.h
diff -N src/hg/instinct/hgBamBam/hgBamBam.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/hg/instinct/hgBamBam/hgBamBam.h 25 May 2010 20:22:45 -0000 1.1
@@ -0,0 +1,89 @@
+/* */
+
+#ifndef HGBAMBAM_H
+#define HGBAMBAM_H
+
+#include "cart.h"
+
+#define DEBUG 1
+#define VERSION "0.1"
+
+#define DEFAULT_LABEL_HEIGHT 10
+#define CYTO_HEIGHT 11
+
+#define DEFAULT_PLOT_WIDTH 1000
+#define DEFAULT_PLOT_HEIGHT 100
+
+/*** Prefixes for variables in cart we don't share with other apps. ***/
+#define bbPrefix "bb_"
+
+/*** Our various cart variables. ***/
+#define bbMode bbPrefix "mode"
+#define bbTableName bbPrefix "tableName"
+#define bbWidth bbPrefix "width"
+#define bbHeight bbPrefix "height"
+#define bbPos bbPrefix "pos"
+
+/** Commands from Javascript client **/
+
+/* ---- Global variables declared in hgHeatmap.c */
+extern struct cart *cart; /* This holds cgi and other variables between clicks. */
+
+struct chromLay {
+ struct chromLay *next;
+
+ char *chrom;
+ float baseStart;
+ float baseEnd;
+
+ float baseWidth;
+ float pxWidth;
+ float pxStart;
+};
+
+struct settings {
+ int width, height;
+
+ double totalBases;
+ float minVal, maxVal;
+
+ MgFont *font;
+ int fontHeight;
+
+ struct hash *layoutHash;
+ struct chromLay *layoutList;
+};
+
+struct hmPixel {
+ struct hmPixel *next;
+ int x;
+ int y;
+ int w;
+ int h;
+
+ double val;
+ int count;
+};
+
+char *cartSettingsString(char *prefix, char *functionName);
+
+void vgMakeColorGradient(struct vGfx *vg,
+ struct rgbColor *start, struct rgbColor *end,
+ int steps, Color *colorIxs);
+
+
+struct settings *initSettings(struct sqlConnection *conn, char *pos,
+ int width, int height, float minVal, float maxVal);
+
+char *copyNumberGif(struct sqlConnection *conn, struct bed *bed,
+ struct settings *settings, char *suffix, float medVal, Color col);
+
+void trashDirMD5File(struct tempName *tn, char *dirName, char *suffix, char *strToHash);
+
+char *genomeLabelsGif(struct sqlConnection *conn, struct settings *settings);
+
+char *genomeScaleGif(struct settings *settings);
+
+char *annotationGif(struct settings *settings, char *tableName);
+
+#endif /* HGBAMBAM_H */