src/hg/hgTables/hgTables.h 1.125
1.125 2009/03/12 16:45:15 kent
Making filter and non-base-pair intersections work with bigWig. (Base-by-base intersections work 80%, but going to have to change design to get last 20% working.) Fixed bug I introduced in correlation of regular wig that Kayla spotted. Moving bigWig stuff to it's own module.
Index: src/hg/hgTables/hgTables.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/hgTables.h,v
retrieving revision 1.124
retrieving revision 1.125
diff -b -B -U 4 -r1.124 -r1.125
--- src/hg/hgTables/hgTables.h 10 Mar 2009 01:25:24 -0000 1.124
+++ src/hg/hgTables/hgTables.h 12 Mar 2009 16:45:15 -0000 1.125
@@ -299,11 +299,22 @@
boolean anyIntersection();
/* Return TRUE if there's an intersection to do. */
+char *intersectOp();
+/* Get intersect op from CGI var and make sure it's ok. */
+
boolean intersectionIsBpWise();
/* Return TRUE if the intersection/union operation is base pair-wise. */
+Bits *bitsForIntersectingTable(struct sqlConnection *conn, struct region *region,
+ int chromSize, boolean isBpWise);
+/* Get a bitmap that corresponds to the table we are intersecting with.
+ * Consult CGI vars to figure out what table it is. */
+
+boolean intersectOverlapFilter(char *op, double moreThresh, double lessThresh, double overlap);
+/* Return TRUE if have enough (or not too much) overlap according to thresholds and op. */
+
/* --------- Functions related to correlation. --------------- */
boolean anyCorrelation();
/* Return TRUE if there's a correlation to do. */
@@ -560,8 +571,11 @@
void stringStatRow(char *label, char *val);
/* Print label, string value. */
+void wigFilterStatRow(struct sqlConnection *conn);
+/* Put row in statistics table that says what wig filter is on. */
+
/* ----------- ChromGraph stuff in chromGraph.c. */
boolean isChromGraph(struct trackDb *track);
/* Return TRUE if it's a chromGraph track */
@@ -592,8 +606,13 @@
/* ----------- Wiggle business in wiggle.c -------------------- */
#define MAX_REGION_DISPLAY 1000
+enum wigOutputType
+/* type of output requested from static int wigOutRegion() */
+ {
+ wigOutData, wigOutBed, wigDataNoPrint,
+ };
boolean trackIsType(char *table, char *type);
/* Return TRUE track is a specific type. Type should be something like "bed" or
* "bigBed" or "bigWig" */
@@ -603,15 +622,8 @@
boolean isBedGraph(char *table);
/* Return TRUE if table is specified as a bedGraph in the current database's
* trackDb. */
-boolean isBigWig(char *table);
-/* Return TRUE if table is bedGraph in current database's trackDb. */
-
-char *bigWigFileName(char *table, struct sqlConnection *conn);
-/* Return file name associated with bigWig. This handles differences whether it's
- * a custom or built-in track. Do a freeMem on returned string when done. */
-
struct bed *getWiggleAsBed(
char *db, char *table, /* Database and table. */
struct region *region, /* Region to get data for. */
char *filter, /* Filter to add to SQL where clause if any. */
@@ -651,13 +663,29 @@
void doSummaryStatsWiggle(struct sqlConnection *conn);
/* Put up page showing summary stats for wiggle track. */
+void wigShowFilter(struct sqlConnection *conn);
+/* print out wiggle data value filter */
+
+/* ----------- BigWig business in bigWig.c -------------------- */
+
+boolean isBigWig(char *table);
+/* Return TRUE if table is bedGraph in current database's trackDb. */
+
+char *bigWigFileName(char *table, struct sqlConnection *conn);
+/* Return file name associated with bigWig. This handles differences whether it's
+ * a custom or built-in track. Do a freeMem on returned string when done. */
+
+
+int bigWigOutRegion(char *table, struct sqlConnection *conn,
+ struct region *region, int maxOut,
+ enum wigOutputType wigOutType);
+/* Write out bigWig for region, doing intersecting and filtering as need be. */
+
void doSummaryStatsBigWig(struct sqlConnection *conn);
/* Put up page showing summary stats for bigWig track. */
-void wigShowFilter(struct sqlConnection *conn);
-/* print out wiggle data value filter */
/* ----------- Custom track stuff. -------------- */
struct customTrack *getCustomTracks();
/* Get custom track list. */