e2467a639cc1e98174ffbd9d0da399b3b75bc9ae markd Thu Jul 26 21:33:38 2012 -0700 highlighting by attribute functionality for GENCODE diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index d5931c9..e4c9091 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -646,30 +646,33 @@ void simpleBedNextPrevEdge(struct track *tg, struct hvGfx *hvg, void *item, int x, int y, int w, int h, boolean next); /* Like linkedFeaturesNextPrevItem, but for simple bed which has no block structure so * this simply zaps us to the right/left edge of the feature. Arrows have already been * drawn; here we figure out coords and draw a mapBox. */ void loadLinkedFeaturesWithLoaders(struct track *tg, struct slList *(*itemLoader)(char **row), struct linkedFeatures *(*lfFromWhatever)(struct slList *item), char *scoreColumn, char *moreWhere, boolean (*itemFilter)(struct slList *item)); /* 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 *linkedFeaturesFromGenePred(struct track *tg, struct genePred *gp, boolean extra); +/* construct a linkedFeatures object from a genePred */ + 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 track *track, char *chrom, int start, int end, struct lm *lm); /* Return list of intervals in range. */ void bigBedAddLinkedFeaturesFrom(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. */ boolean canDrawBigBedDense(struct track *tg); @@ -1180,30 +1183,34 @@ // dense subtracks have conditional centerLabels boolean isCenterLabelConditionallySeen(struct track *track); // returns FALSE if track and prevTrack have same parent, and are both dense subtracks #define isCenterLabelIncluded(track) \ (isWithCenterLabels(track) && (theImgBox || isCenterLabelConditionallySeen(track))) // Center labels may be conditionally included void affyTxnPhase2Methods(struct track *track); /* Methods for dealing with a composite transcriptome tracks. */ void loadGenePred(struct track *tg); /* Convert gene pred in window to linked feature. */ +void loadGenePredWithConfiguredName(struct track *tg); +/* Convert gene pred info in window to linked feature. Include name + * in "extra" field (gene name, accession, or both, depending on UI) */ + boolean highlightItem(struct track *tg, void *item); /* Should this item be highlighted? */ void linkedFeaturesSeriesDrawAt(struct track *tg, void *item, struct hvGfx *hvg, int xOff, int y, double scale, MgFont *font, Color color, enum trackVisibility vis); /* Draw a linked features series item at position. */ #define NEXT_ITEM_ARROW_BUFFER 1 /* Space around "next item" arrow (in pixels). */ void addWikiTrack(struct track **pGroupList); /* Add wiki track and append to group list. */ void wikiTrackMethods(struct track *tg);