src/hg/hgc/mgcClick.c 1.32

1.32 2010/04/04 00:36:13 markd
improved description of MGC/RefSeq CDS similarity, fixed percent identity
Index: src/hg/hgc/mgcClick.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/mgcClick.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -b -B -U 4 -r1.31 -r1.32
--- src/hg/hgc/mgcClick.c	28 Aug 2009 03:49:25 -0000	1.31
+++ src/hg/hgc/mgcClick.c	4 Apr 2010 00:36:13 -0000	1.32
@@ -223,8 +223,14 @@
 ci->gi = sqlUnsigned(row[i++]);
 sqlFreeResult(&sr);
 }
 
+static char *cdnaInfoDbName(struct cloneInfo *ci)
+/* get the name to use in describing this gene collection */
+{
+return (ci->isMgc ? mgcDbName() : "ORFeome");
+}
+
 static void getRefSeqInfo(struct sqlConnection *conn, struct cloneInfo *ci)
 /* fill in refSeq info */
 {
 ci->refSeqs = geneSimilaritiesBuildAt(conn, TRUE, ci->acc, seqName, ci->start,
@@ -455,15 +461,15 @@
 webPrintLinkCellEnd();
 
 // identity
 webPrintLinkCellRightStart();
-printf("%.1f%%", 100.0 - pslCalcMilliBad(psl, TRUE) * 0.1);
+printf("%.2f%%", 100.0 * pslIdent(psl));
 webPrintLinkCellEnd();
 
 // fraction aligned
 webPrintLinkCellRightStart();
 int aligned = psl->match + psl->misMatch + psl->repMatch;
-printf("%.1f%%", 100.0*aligned/((float)psl->qSize));
+printf("%.2f%%", 100.0*aligned/((float)psl->qSize));
 webPrintLinkCellEnd();
 }
 
 static void prAligns(struct sqlConnection *conn, struct cloneInfo *ci)
@@ -735,29 +741,32 @@
        gs->gene->chrom, gs->gene->txStart+1, gs->gene->txEnd);
 webPrintLinkCellEnd();
 
 // similarity
-webPrintLinkCellStart();
+webPrintLinkCellRightStart();
 printf("%0.2f%%", 100.0*gs->sim);
 webPrintLinkCellEnd();
 }
 
 static void prRefSeqSims(struct cloneInfo *ci)
 /* print similarity information for RefSeqs */
 {
-webNewSection("RefSeq CDS similarity with %s clone %s", 
-              (ci->isMgc ? mgcDbName() : "ORFeome"), ci->acc);
+webNewSection("RefSeq CDS isoform similarity of %s clone %s", 
+              cdnaInfoDbName(ci), ci->acc);
 webPrintLinkTableStart();
 webPrintLabelCell("RefSeq");
 webPrintLabelCell("Position");
-webPrintLabelCell("CDS similarity");
+webPrintLabelCell("Similarity");
 struct geneSim *gs;
 for (gs = ci->refSeqs->genes; gs != NULL; gs = gs->next)
     prRefSeqSim(ci, gs);
 webPrintLinkTableEnd();
+printf("This table compares the similarity of the BLAT genomic alignments of "
+       "the CDS of this %s clone with alignment of RefSeq mRNA CDSs.  This is a metric "
+       "of the similarity of the exon structure of the mRNAs, rather than a measure of their "
+       "nucleotide sequence similarity.", cdnaInfoDbName(ci));
 }
 
-
 void doMgcGenes(struct trackDb *tdb, char *acc)
 /* Process click on a mgcGenes track. */
 {
 struct sqlConnection *conn = hAllocConn(database);