c28ad38574430f9e09967086b7ea4cd45edc7e19 angie Tue Jan 11 15:22:55 2011 -0800 Some more polishing for SNP details. diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 54ebb4b..c63c225 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -15648,31 +15648,31 @@ snp->chromStart, snp->chromEnd); struct genePred *gene; char query[256]; char buf[256]; safef(query, sizeof(query), "select shortLabel from trackDb where tableName='%s'", gt->name); char *shortLabel = sqlQuickQuery(conn, query, buf, sizeof(buf)-1); if (shortLabel == NULL) shortLabel = gt->name; for (gene = geneList; gene != NULL; gene = gene->next) printSnp125FunctionInGene(snp, gt->name, shortLabel, gene); if (geneList == NULL) printSnp125NearGenes(conn, snp, gt->name, shortLabel); first = FALSE; } if (! first) - printf("</TABLE><BR>\n"); + printf("</TABLE>\n"); hFreeConn(&conn); } char *dbSnpFuncFromInt(unsigned char funcCode) /* Translate an integer function code from NCBI into an abbreviated description. * Do not free return value! */ // Might be a good idea to flesh this out with all codes, libify, and share with // snpNcbiToUcsc instead of partially duplicating. { switch (funcCode) { case 3: return "coding-synon"; case 8: return "cds-reference"; @@ -15781,31 +15781,31 @@ total2N = round(n / f); int roundedN = round(n); if (fabs(n - roundedN) < 0.01) printf("(%d / %d)", roundedN, total2N); else { gotNonIntN = TRUE; printf("(%.3f / %d)", n, total2N); } } } printf("</TR></TABLE>\n"); if (gotNonIntN) printf(" <em>Note: dbSNP extrapolates allele counts from reported frequencies and " "reported 2N sample sizes (total %d); non-integer allele count may imply " - "a problem with one of the reported numbers.</em>\n", total2N); + "an inaccuracy in one of the reported numbers.</em><BR>\n", total2N); } else puts("</TABLE>"); if (isNotEmpty(snp->bitfields) && differentString(snp->bitfields, "unknown")) { printf("<BR><B><A HREF=\"#Bitfields\">Miscellaneous properties annotated by dbSNP</A>:" "</B>\n\n"); struct slName *bitfields = slNameListFromComma(snp->bitfields); if (slNameInList(bitfields, "clinically-assoc")) printf("<BR> <B>***clinically associated***</B> " "(SNP is in OMIM/OMIA and/or " "at least one submitter is a Locus-Specific Database)\n"); if (slNameInList(bitfields, "has-omim-omia")) printf("<BR> SNP is in OMIM/OMIA\n"); if (slNameInList(bitfields, "microattr-tpa")) @@ -16190,38 +16190,39 @@ errAbort("SNP %s not found at %s base %d", itemName, seqName, start); sqlFreeResult(&sr); safef(query, sizeof(query), "select * from %s where name='%s'", table, itemName); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { if (version >= 132) snp = snp132ExtLoad(row+rowOffset); else snp = (struct snp132Ext *)snp125Load(row+rowOffset); if (snp->chromStart != start || differentString(snp->chrom, seqName)) { if (snpCount==0) - printf("<B>This SNP maps to these additional locations:" + printf("<BR><B>This SNP maps to these additional locations:" "</B><BR><BR>"); snpCount++; bedPrintPos((struct bed *)snp, 3, tdb); printf("<BR>"); } } sqlFreeResult(&sr); +puts("<BR>"); // Make table for collapsible sections: puts("<TABLE>"); checkForGwasCatalog(conn, tdb, itemName); checkForHgdpGeo(conn, tdb, itemName, start); checkForHapmap(conn, tdb, itemName); checkForLsSnpMappings(conn, tdb->track, itemName); printSnpAlignment(tdb, snpAlign); puts("</TABLE>"); printTrackHtml(tdb); hFreeConn(&conn); } void doTigrGeneIndex(struct trackDb *tdb, char *item) /* Put up info on tigr gene index item. */