2f18a71851ebd3dd7926c75e12f6a93f70551b55 braney Tue Nov 10 13:39:20 2020 -0800 changes in response to code review diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index cfc9c07..9c71fa5 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -12646,31 +12646,31 @@ tg->nextPrevItem = linkedFeaturesLabelNextPrevItem; } void oregannoMethods (struct track *tg) /* load so can allow filtering on type */ { tg->attrTable = NULL; tg->loadItems = loadOreganno; tg->itemColor = oregannoColor; tg->itemNameColor = oregannoColor; tg->nextItemButtonable = TRUE; tg->nextPrevItem = linkedFeaturesLabelNextPrevItem; } -static char *getCode(char *inhMode) +static char *omimGetInheritanceCode(char *inhMode) /* Translate inheritance mode strings into much shorter codes. */ { static struct dyString *dy = NULL; // re-use this string if (dy == NULL) dy = dyStringNew(0); dyStringClear(dy); struct slName *modes = slNameListFromString(inhMode, ','); for(; modes; modes = modes->next) { stripChar(modes->name, '?'); char *mode = skipLeadingSpaces(modes->name); if (sameString(mode, "Autosomal dominant")) dyStringAppend(dy, "AD"); @@ -12738,31 +12738,31 @@ { struct slName *phenotypes = slNameListFromString(ret, '$'); if (slCount(phenotypes)) { if (slCount(phenotypes) > 1) dyStringPrintf(dy, ", Phenotypes: "); else dyStringPrintf(dy, ", Phenotype: "); for(; phenotypes; phenotypes = phenotypes->next) { struct slName *components = slNameListFromString(phenotypes->name, '|'); dyStringPrintf(dy, "%s", components->name); components = components->next; - char *inhCode = getCode(components->name); + char *inhCode = omimGetInheritanceCode(components->name); if (!isEmpty(inhCode)) dyStringPrintf(dy, ", %s", inhCode); components = components->next; if (!isEmpty(components->name)) dyStringPrintf(dy, ", %s", components->name); if (phenotypes->next) dyStringPrintf(dy, "; "); } } } } hFreeConn(&conn);