04f51b90a6a1e3237013c7883e3e7d5ae3900a7b jcasper Fri Jul 22 14:45:10 2016 -0700 Minor changes following code review, refs #17723 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index c1276d6..6de4d7d 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -9858,46 +9858,49 @@ if (sqlFieldIndex(conn, "decipherRaw", "phenotypes") >= 0) { sqlSafef(query, sizeof(query), "select phenotypes, mean_ratio, inheritance, pathogenicity, contribution " "from decipherRaw where id = '%s'", itemName); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if ((row != NULL) && strlen(row[0]) >= 1) { char *phenoString = replaceChars(row[0], "|", "</li>\n<li>"); printf("<b>Phenotypes:</b>\n<ul>\n" "<li>%s</li>\n" "</ul>\n", phenoString); // freeMem(phenoString); } - if ((row != NULL) && strlen(row[1]) >= 1) + if (row != NULL) + { + if (isNotEmpty(row[1])) { printf("<b>Mean Ratio:</b> %s\n<br>\n", row[1]); } - if ((row != NULL) && strlen(row[2]) >= 1) + if (isNotEmpty(row[2])) { printf("<b>Inheritance:</b> %s\n<br>\n", row[2]); } - if ((row != NULL) && strlen(row[3]) >= 1) + if (isNotEmpty(row[3])) { printf("<b>Pathogenicity:</b> %s\n<br>\n", row[3]); } - if ((row != NULL) && strlen(row[3]) >= 1) + if (isNotEmpty(row[4])) { printf("<b>Contribution:</b> %s\n<br>\n", row[4]); } + } sqlFreeResult(&sr); } else { sqlSafef(query, sizeof(query), "select distinct phenotype from decipherRaw where id ='%s' order by phenotype", itemName); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if ((row != NULL) && strlen(row[0]) >= 1) { printf("<B>Phenotype: </B><UL>"); while (row != NULL) { printf("<LI>"); printf("%s\n", row[0]);