22d9c78dc6e1a233fd6d7c000ea1f26fa0f01f5a kate Thu Feb 11 12:58:46 2016 -0800 Add pseudogene transcript class (colored in dense mode. refs #15645 diff --git src/hg/hgTracks/gtexTracks.c src/hg/hgTracks/gtexTracks.c index 25205f8..afe66b9 100644 --- src/hg/hgTracks/gtexTracks.c +++ src/hg/hgTracks/gtexTracks.c @@ -32,65 +32,70 @@ struct gtexGeneInfo /* GTEx gene model, names, and expression medians */ { struct gtexGeneInfo *next; /* Next in singly linked list */ struct gtexGeneBed *geneBed;/* Gene name, id, canonical transcript, exp count and medians from BED table */ struct genePred *geneModel; /* Gene structure from model table */ double *medians1; /* Computed medians */ double *medians2; /* Computed medians for comparison (inverse) graph */ int height; /* Item height in pixels */ }; /***********************************************/ /* Color gene models using GENCODE conventions */ -struct rgbColor codingColor = {12, 12, 120}; // #0C0C78 -struct rgbColor noncodingColor = {0, 100, 0}; // #006400 -struct rgbColor problemColor = {254, 0, 0}; // #FE0000 -struct rgbColor unknownColor = {1, 1, 1}; +static struct rgbColor codingColor = {12, 12, 120}; // #0C0C78 +static struct rgbColor noncodingColor = {0, 100, 0}; // #006400 +static struct rgbColor pseudoColor = {255,51,255}; // #FF33FF +static struct rgbColor problemColor = {254, 0, 0}; // #FE0000 +static struct rgbColor unknownColor = {1, 1, 1}; static struct statusColors /* Color values for gene models */ { Color coding; Color noncoding; + Color pseudo; Color problem; Color unknown; } statusColors = {0,0,0,0}; static void initGeneColors(struct hvGfx *hvg) /* Get and cache indexes for color values */ { if (statusColors.coding != 0) return; statusColors.coding = hvGfxFindColorIx(hvg, codingColor.r, codingColor.g, codingColor.b); statusColors.noncoding = hvGfxFindColorIx(hvg, noncodingColor.r, noncodingColor.g, noncodingColor.b); +statusColors.pseudo = hvGfxFindColorIx(hvg, pseudoColor.r, pseudoColor.g, pseudoColor.b); statusColors.problem = hvGfxFindColorIx(hvg, problemColor.r, problemColor.g, problemColor.b); statusColors.unknown = hvGfxFindColorIx(hvg, unknownColor.r, unknownColor.g, unknownColor.b); } static Color getTranscriptStatusColor(struct hvGfx *hvg, struct gtexGeneBed *geneBed) /* Find GENCODE color for transcriptClass of canonical transcript */ { initGeneColors(hvg); if (geneBed->transcriptClass == NULL) return statusColors.unknown; if (sameString(geneBed->transcriptClass, "coding")) return statusColors.coding; if (sameString(geneBed->transcriptClass, "nonCoding")) return statusColors.noncoding; +if (sameString(geneBed->transcriptClass, "pseudo")) + return statusColors.pseudo; if (sameString(geneBed->transcriptClass, "problem")) return statusColors.problem; return statusColors.unknown; } /***********************************************/ /* Cache tissue info */ struct gtexTissue *getTissues() /* Get and cache tissue metadata from database */ { static struct gtexTissue *gtexTissues = NULL; if (!gtexTissues) gtexTissues = gtexGetTissues();