0735f90654447d1aad66609d7eafae8b8f8bd4ef hartera Tue Apr 23 13:15:16 2013 -0700 Made changes to RetroFinder details page to tidy up presentation and also to make the text more intuitive to the user. diff --git src/hg/hgc/retroClick.c src/hg/hgc/retroClick.c index 1ab2ca9..5be10a0 100644 --- src/hg/hgc/retroClick.c +++ src/hg/hgc/retroClick.c @@ -179,70 +179,79 @@ static void displaySrcGene(struct sqlConnection *conn, struct mappingInfo *mi) /* display information about the source gene that was mapped */ { char srcGeneUrl[1024]; /* description will be NULL if deleted */ if (!startsWith("retroAugust",mi->geneSet)) getGenbankInfo(conn, mi); /* construct URL to browser */ safef(srcGeneUrl, sizeof(srcGeneUrl), "../cgi-bin/hgTracks?db=%s&position=%s:%d-%d", database, mi->pg->gChrom, mi->pg->gStart, mi->pg->gEnd); printf("\n"); -printf("\n"); +printf("

Source Gene:

\n"); printf("\n"); printf("\n"); printf("
Source gene
%s", srcGeneUrl, mi->pg->name); if (mi->desc == NULL) - printf(" gene no longer in source database"); + printf(" Gene no longer in source database"); else printf("%s%s", mi->sym, mi->desc); printf("
\n"); } static void displayRetroDetails(struct sqlConnection *conn, struct mappingInfo *mi) /* display information from a retroXXXInfo table */ { struct ucscRetroInfo *pg = mi->pg; char query[256]; char orthoTable[128]; +char orgDb[128]; +char *org; + if (mi->suffix != NULL && strlen(mi->suffix) > 0) safef(orthoTable, sizeof(orthoTable), "%s%sOrtho%s", mi->tblPre, mi->geneSet, mi->suffix); else safef(orthoTable, sizeof(orthoTable), "%s%sOrtho", mi->tblPre, mi->geneSet); printf("\n"); +printf("

Breaks in Orthology:

\n"); printf("\n"); -printf("\n"); +printf("\n"); printf("\n"); if (hTableExists(database, orthoTable)) { struct sqlResult *sr; char **row; safef(query, sizeof(query), "select * from %s where name = '%s' ", orthoTable, pg->name); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { struct ucscRetroOrtho *puro = ucscRetroOrthoLoad(row); - printf("\n", puro->overlap); } sqlFreeResult(&sr); } else printf("", orthoTable); printf("
Orthology (net) BreakCoverage %%
Organism%% Coverage
%s ", puro->db); + /* get substring after "net" prefix and convert first char to lower + case then get organism name */ + safecpy(orgDb, sizeof(orgDb), puro->db+3); + orgDb[0] = tolower(orgDb[0]); + org = hOrganism(orgDb); + printf("
%s (%s) ", org, orgDb); printf("%d
table %s not found
\n"); } static struct psl *loadPslRangeT(char *table, char *qName, char *tName, int tStart, int tEnd) /* Load a list of psls given qName tName tStart tEnd */ { struct sqlResult *sr = NULL; char **row; struct psl *psl = NULL, *pslList = NULL; @@ -501,44 +510,44 @@ char scoreSql[128]; struct psl *psl; float coverFactor = 0; float maxOverlap = 0; if (mi->suffix == NULL) { safef(alignTbl, sizeof(alignTbl), "%s%sAli", mi->tblPre, mi->geneSet); safef(scoreSql, sizeof(scoreSql), "select max(score) from %s%sInfo", mi->tblPre, mi->geneSet); } else { safef(alignTbl, sizeof(alignTbl), "%s%sAli%s", mi->tblPre, mi->geneSet, mi->suffix); safef(scoreSql, sizeof(scoreSql), "select max(score) from %s%sInfo%s", mi->tblPre, mi->geneSet, mi->suffix); } printf("\n"); -printf("\n"); +printf("

Retrogene Statistics:

\n"); printf("\n"); printf("\n"); printf("\n"); if (sameString(pg->type, "singleExon")) printf("\n",pg->type); else printf("\n",pg->type); printf("\n", pg->score, sqlQuickNum(conn, scoreSql) ); -printf("\n", pg->coverage, pg->matches); -printf("\n", pg->coverage, pg->matches); +printf("\n", pg->conservedSpliceSites); printf("\n", pg->parentSpliceCount); psl = getAlignments(conn, alignTbl, mi->pg->name); if (psl != NULL) { maxOverlap = (float)pg->maxOverlap/(float)(psl->match+psl->misMatch+psl->repMatch) ; coverFactor = ((float)(psl->qSize-psl->qEnd)/(float)psl->qSize); } else { maxOverlap = 0; } wt[0] = 0; wt[1] = 0.85; wt[2] = 0.2; wt[3] = 0.3; wt[4] = 0.8; wt[5] = 1; wt[6] = 1 ; wt[7] = 0.5; wt[8] = 0.5; wt[9] = 1; wt[10] = 1; #ifdef debug @@ -546,42 +555,42 @@ struct psl *pslList = getParentAligns(conn, mi, &table); if (psl != NULL) { printf("\n"); } if (pslList != NULL) { printf("\n"); pslFreeList(&pslList); } #endif -printf("\n",pg->posConf); +printf("\n",pg->posConf); #ifdef score printf("\n", pg->exonCover, wt[1]*(log(pg->exonCover+1)/log(2))*200 , pg->conservedSpliceSites, wt[2]*(((log(pg->axtScore>0?pg->axtScore:1)/log(2))*170)-1000), wt[3]*(log(pg->polyAlen+2)*200) , wt[4]*overlapOrtholog*10 , pg->overlapMouse, pg->overlapDog, pg->processedIntrons, wt[5]*(((log(pg->processedIntrons > 0 ? pg->processedIntrons : 1))/log(2))*600) , pg->intronCount, wt[6]*pow(pg->intronCount,0.5)*750 , wt[7]*(maxOverlap*300), pg->coverage, pg->qEnd, pg->qSize , pg->qSize, wt[8]*((pg->coverage/100.0)*(1.0-coverFactor)*300.0),
Retrogene stats
FeatureValue
Type of Parent%s
Expression of Retrocopy%s
Score %d (range from 0 - %d)
Alignment Coverage of parent gene (Bases matching Parent) %d %%  (%d bp)
Introns Procesed Out %d out of %d (%d exons covered)\n", pg->processedIntrons, (pg->parentSpliceCount/2), pg->exonCover); -printf("
Possible Introns (or gaps) in Retro%d + %d\n", pg->intronCount, pg->alignGapCount); +printf("
Parent Gene Alignment Coverage (Bases Matching Parent) %d %%  (%d bp)
Introns Processed Out %d out of %d (%d exons covered)\n", pg->processedIntrons, (pg->parentSpliceCount/2), pg->exonCover); +printf("
Possible Introns or Gaps in Retrogene%d,%d\n", pg->intronCount, pg->alignGapCount); printf("
Conserved Splice Sites%d
Parent Splice Sites%d
Blocks in retro:gap%%/intronsSpliced \n"); printBlocks(psl, MAXBLOCKGAP, pslList); printf("
Exons in parent:gap%% \n"); printBlocks(pslList, MAXBLOCKGAP, NULL); printf("
Length of PolyA Tail%d As out of %d bp
PolyA Tail %% A's(position)%5.1f %%\n",pg->polyA,pg->polyAlen, (float)pg->polyA*100/(float)pg->polyAlen); +printf("
Length of PolyA Tail%d As out of %d bp
%% A's from Parent PolyA tail (Position)%5.1f %%\n",pg->polyA,pg->polyAlen, (float)pg->polyA*100/(float)pg->polyAlen); if (pg->polyAstart < 0) printf(" (%d bp before end of retrocopy)
\n",-(pg->polyAstart)); else printf(" (%d bp past end of retrocopy)
\n",pg->polyAstart); -printf("
mRNA expression evidence"); +printf("
mRNA Expression Evidence"); if (!sameString(pg->overName, "none")) printf("%s (overlap:  %d bp)\n", pg->overName, pg->maxOverlap); else printf("No overlapping"); -printf("
bestorf score (>50 is good)%4.0f
BESTORF Score (>50 is good)%4.0f
score function1:xon %d %4.1f conSS %d 2: ax %4.1f 3: pA %4.1f 4: net + %4.1f max (%d, %d) 5: procIntrons %d %4.1f 6:in.cnt %d -%4.1f 7:overlap - %4.1f 8:cov %d*(qe %d- qsz %d)/%d=%4.1f 9:tRep - %4.1f 10:oldintron %d %4.1f