d89c874346552fbb921d6a1d038a79605f6ce613 jcasper Wed Jul 13 11:45:07 2016 -0700 DECIPHER pipeline now runs on their new file format. Also added more data to the hgc output. refs #14465 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index af4b2a8..739c2c6 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -9842,47 +9842,83 @@ struct sqlConnection *conn = hAllocConn(database); char query[256]; struct sqlResult *sr; char **row; struct sqlConnection *conn2 = hAllocConn(database); char query2[256]; struct sqlResult *sr2; char **row2; char *strand={"+"}; int start = cartInt(cart, "o"); int end = cartInt(cart, "t"); char *chrom = cartString(cart, "c"); printf("<H3>Patient %s </H3>", itemName); -/* print phenotypes */ +/* print phenotypes and other information, if available */ +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) + { + printf("<b>Mean Ratio:</b> %s\n<br>\n", row[1]); + } + if ((row != NULL) && strlen(row[2]) >= 1) + { + printf("<b>Inheritance:</b> %s\n<br>\n", row[2]); + } + if ((row != NULL) && strlen(row[3]) >= 1) + { + printf("<b>Pathogenicity:</b> %s\n<br>\n", row[3]); + } + if ((row != NULL) && strlen(row[3]) >= 1) + { + 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]); row = sqlNextRow(sr); } printf("</UL>"); } sqlFreeResult(&sr); + } /* link to Ensembl DECIPHER Patient View page */ printf("<B>Patient View: </B>\n"); printf("More details on patient %s at ", itemName); printf("<A HREF=\"%s%s\" target=_blank>", "https://decipher.sanger.ac.uk/patient/", itemName); printf("DECIPHER</A>.<BR><BR>"); /* print position info */ printPosOnChrom(chrom, start, end, strand, TRUE, itemName); /* print UCSC Genes in the reported region */ sqlSafef(query, sizeof(query), "select distinct t.name from knownCanonToDecipher t, kgXref x where value ='%s' and x.kgId=t.name order by geneSymbol", itemName); sr = sqlMustGetResult(conn, query);