src/hg/hgTracks/hgTracks.h 1.193
1.193 2009/12/01 05:49:36 kent
Moving a few bigBed-specific functions from bedTrack.c to new modulc bigBedTrack.c Making bigBeds in dense mode do drawing by querying summary rather than going through itemList. Making it so that it only loads maxItems+1 (251 by default) items before flipping to dense. Making it draw density plot in grayscale if denseCoverage is set. Net result should be reduced bigBed i/o when zoomed out.
Index: src/hg/hgTracks/hgTracks.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/hgTracks.h,v
retrieving revision 1.192
retrieving revision 1.193
diff -b -B -U 4 -r1.192 -r1.193
--- src/hg/hgTracks/hgTracks.h 17 Nov 2009 20:47:49 -0000 1.192
+++ src/hg/hgTracks/hgTracks.h 1 Dec 2009 05:49:36 -0000 1.193
@@ -601,8 +601,27 @@
/* Make a linkedFeatures loader by providing three functions: (1) a regular */
/* item loader found in all autoSql modules, (2) a custom myStruct->linkedFeatures */
/* translating function, and (3) a function to free the thing loaded in (1). */
+struct linkedFeatures *bedMungToLinkedFeatures(struct bed **pBed, struct trackDb *tdb,
+ int fieldCount, int scoreMin, int scoreMax, boolean useItemRgb);
+/* Convert bed to a linkedFeature, destroying bed in the process. */
+
+struct bigBedInterval *bigBedSelectRange(struct sqlConnection *conn, struct track *track,
+ char *chrom, int start, int end, struct lm *lm);
+/* Return list of intervals in range. */
+
+void bigBedAddLinkedFeaturesFrom(struct sqlConnection *conn, struct track *track,
+ char *chrom, int start, int end, int scoreMin, int scoreMax, boolean useItemRgb,
+ int fieldCount, struct linkedFeatures **pLfList);
+/* Read in items in chrom:start-end from bigBed file named in track->bbiFileName, convert
+ * them to linkedFeatures, and add to head of list. */
+
+void bigBedDrawDense(struct track *tg, int seqStart, int seqEnd,
+ struct hvGfx *hvg, int xOff, int yOff, int width,
+ MgFont *font, Color color);
+/* Draw dense mode bigBed. */
+
void adjustBedScoreGrayLevel(struct trackDb *tdb, struct bed *bed, int scoreMin, int scoreMax);
/* For each distinct trackName passed in, check cart for trackName.minGrayLevel; if
* that is different from the gray level implied by scoreMin's place in [0..scoreMax],
* then linearly transform bed->score from the range of [scoreMin,scoreMax] to
@@ -800,11 +819,14 @@
void bedGraphMethods(struct track *track, struct trackDb *tdb,
int wordCount, char *words[]);
void bigWigMethods(struct track *track, struct trackDb *tdb,
int wordCount, char *words[]);
-
/* Make track group for wig - wiggle tracks. */
+void bigBedMethods(struct track *track, struct trackDb *tdb,
+ int wordCount, char *words[]);
+/* Set up bigBed methods. */
+
void chromGraphMethods(struct track *tg);
/* Fill in chromGraph methods for built in track. */
void chromGraphMethodsCt(struct track *tg);
@@ -1087,8 +1109,11 @@
boolean ssFilesExist(char *ss);
/* Return TRUE if both files in ss exist. */
+int maximumTrackItems(struct track *tg);
+/* Return the maximum number of items allowed in track. */
+
int maximumTrackHeight(struct track *tg);
/* Return the maximum track height allowed in pixels. */
struct dyString *uiStateUrlPart(struct track *toggleGroup);