f8929d074fa315ae76bc2430a72ca38f2fc0f36a kate Tue Jan 28 12:08:34 2014 -0800 Add some flexibility to Motif section display. refs #9092 diff --git src/hg/hgc/peakClusters.c src/hg/hgc/peakClusters.c index 3c5fabf..1904024 100644 --- src/hg/hgc/peakClusters.c +++ src/hg/hgc/peakClusters.c @@ -445,31 +445,32 @@ #ifdef SHOW_MAX_SCORE float maxScore = -1; sqlSafef(query, sizeof(query), "select max(score) from %s where name = '%s'", motifTable, motifName); sr = sqlGetResult(conn, query); if ((row = sqlNextRow(sr)) != NULL) { if(!isEmpty(row[0])) { maxScore = sqlFloat(row[0]); } } sqlFreeResult(&sr); #endif - puts("

"); + //puts("

"); + webNewSection("Motif Sequence from Matching Strand"); for (hit = hits, i = 0; hit != NULL; hit = hit->next, i++) { struct dnaSeq *seq = hDnaFromSeq(database, seqName, hit->chromStart, hit->chromEnd, dnaLower); if(hit->strand[0] == '-') reverseComplement(seq->dna, seq->size); seqs[i] = seq; // TODO: move to hgc.c (with other pos printers) safef(posLink, sizeof(posLink),"%s:%d-%d", hgTracksPathAndSettings(), database, cluster->chrom, hit->chromStart+1, hit->chromEnd, cluster->chrom, hit->chromStart+1, hit->chromEnd); printf("Motif Name: %s
\n", motifName); printf("Motif Score"); if (hitCount > 1) @@ -485,31 +486,31 @@ } else { #ifdef SHOW_MAX_SCORE printf(": %.2f (%s max: %.2f)
\n", hit->score, cluster->name, maxScore); #else printf(": %.2f
\n", hit->score); #endif printf("Motif Position: %s
\n", posLink); printf("Motif Strand: %c
\n", (int)hit->strand[0]); } } } if (seqs != NULL) { - motifMultipleHitsSection(seqs, hitCount, motif); + motifLogoAndMatrix(seqs, hitCount, motif); } } void doFactorSource(struct sqlConnection *conn, struct trackDb *tdb, char *item, int start) /* Display detailed info about a cluster of TFBS peaks from other tracks. */ { int rowOffset = hOffsetPastBin(database, seqName, tdb->table); char **row; struct sqlResult *sr; char query[256]; sqlSafef(query, sizeof(query), "select * from %s where name = '%s' and chrom = '%s' and chromStart = %d", tdb->table, item, seqName, start); sr = sqlGetResult(conn, query);