2a99d78cddf4b7de673435f911262ee25b36c238 braney Sun Feb 12 14:14:18 2023 -0800 ongoing work on snake display for chains and psls diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index 27735eb..7543030 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -397,30 +397,31 @@ void *original; /* The structure that was converted into this (when needed later). */ struct itemAttr *itemAttr; /* itemAttr object for this lf, or NULL */ unsigned highlightColor; /* highlight color,0 if no highlight */ enum highlightMode highlightMode; /* highlight mode,0 if no highlight */ char* mouseOver; /* mouse over text */ char* cds; /* CDS in NCBI format */ #ifdef USE_HAL boolean isHalSnake; struct hal_target_dupe_list_t *dupeList; #endif boolean isBigGenePred; char *label; /* Label for bigBeds. */ int qSize; /* Query size for chain/bigChain */ double squishyPackVal; /* the squishyPoint value for this item. */ + struct snakeInfo *snakeInfo; /* if we're in snake mode, here's the deets */ }; struct linkedFeaturesSeries /* series of linked features that are comprised of multiple linked features */ { struct linkedFeaturesSeries *next; char *name; /* name for series of linked features */ int start, end; /* Start/end in browser coordinates. */ int orientation; /* Orientation. */ int grayIx; /* Gray index (average of features) */ boolean noLine; /* if true don't draw line connecting features */ struct linkedFeatures *features; /* linked features for a series */ }; struct knownGenesExtra @@ -926,30 +927,33 @@ void loadGappedBed(struct track *tg); /* Convert bed info in window to linked feature. */ void linkedFeaturesFreeList(struct linkedFeatures **pList); /* Free up a linked features list. */ void freeLinkedFeaturesSeries(struct linkedFeaturesSeries **pList); /* Free up a linked features series list. */ int simpleFeatureCmp(const void *va, const void *vb); /* Compare to sort based on start. */ int linkedFeaturesCmp(const void *va, const void *vb); /* Compare to sort based on chrom,chromStart. */ +int linkedFeaturesCmpName(const void *va, const void *vb); +/* Help sort linkedFeatures by name. */ + int linkedFeaturesCmpStart(const void *va, const void *vb); /* Help sort linkedFeatures by starting pos. */ void linkedFeaturesBoundsAndGrays(struct linkedFeatures *lf); /* Calculate beginning and end of lf from components, etc. */ int lfCalcGrayIx(struct linkedFeatures *lf); /* Calculate gray level from components. */ void linkedFeaturesDraw(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis); /* Draw linked features items. */ void linkedFeaturesAverageDense(struct track *tg,