6419fc05af66878081e2b7d4d944900ec42d7cb1 tdreszer Fri Jun 22 15:29:37 2012 -0700 First of many checkins as dictated by Jim's OCD. Formatting space after if and limiting lines to 100 chars. Changes limited to lines last touched by tdreszer (git blame) so as not to ruin history. None of these changes should affect executables in any way. Only affect is to my sanity and Jim's. diff --git src/ameme/ameme.c src/ameme/ameme.c index df1c18f..9b3537b 100644 --- src/ameme/ameme.c +++ src/ameme/ameme.c @@ -1130,32 +1130,32 @@ bestRc = isRc; } } if (bestScore < threshold) return NULL; pos = allocPosition(); pos->seqEl = seqEl; pos->pos = bestPos; pos->score = bestScore; pos->weight = 0.0; pos->isRc = bestRc; pos->next = NULL; return pos; } -struct position *positionsInSeq(struct profile *prof, struct profile *rcProf, struct seqList *seqEl, int seqSize, - int *slogLocProb, int threshold) +struct position *positionsInSeq(struct profile *prof, struct profile *rcProf, struct seqList *seqEl, + int seqSize, int *slogLocProb, int threshold) /* Return a list of positions in sequence matching profile at better than threshold levels. * (Set threshold to 0 for "better than chance". ) */ { int profSize = prof->columnCount; int endIx = seqSize - profSize + 1; int slogInvPos = slog(1.0/(endIx)); boolean isRc; int score; int i; struct position *pos, *posList = NULL; struct profileColumn *col, *rcCol = NULL; col = prof->columns; if (rcProf != NULL) rcCol = rcProf->columns; @@ -1178,32 +1178,32 @@ else { /* In overlapping case take the best overlapping score. */ if (score > posList->score) { posList->pos = i; posList->score = score; posList->isRc = isRc; } } } } return posList; } -struct position *getPositions(struct profile *prof, struct profile *rcProf, struct seqList *seqEl, int seqSize, - int *slogLocProb, int threshold) +struct position *getPositions(struct profile *prof, struct profile *rcProf, struct seqList *seqEl, + int seqSize, int *slogLocProb, int threshold) /* Get the places the profile hits in the seqList. */ { if (maxOcc == 1) return bestMatchInSeq(prof, rcProf, seqEl, seqSize, slogLocProb, threshold); else { struct position *posList, *lastPos; int numToTake = maxOcc; int i; posList = positionsInSeq(prof, rcProf, seqEl, seqSize, slogLocProb, threshold); slSort(&posList, cmpPositions); lastPos = posList; for (i=1; inext) { score = pos->score; if (score > bestScore) bestScore = score; } return bestScore; } -void showProfHits(struct profile *prof, struct profile *rcProf, struct seqList *seqList, int seqElSize, - int nameSize, int *retBestScore) +void showProfHits(struct profile *prof, struct profile *rcProf, struct seqList *seqList, + int seqElSize, int nameSize, int *retBestScore) /* Display profile in context of goodSeq. While we're scanning through also * return best score of profile on any sequence. */ { struct seqList *el; struct dnaSeq *seq; int score; int bestScore = 0; int totalScore; int seqSize = seqList->seq->size; DNA *uppered = needMem(seqSize + 1); struct position *pos, *posList; makeLocProb(prof->locale.mean, prof->locale.standardDeviation, seqElSize); for (el = seqList; el != NULL; el = el->next) { @@ -2664,32 +2664,32 @@ /* Do one set of motif searches */ { struct tempName tn; char *backgroundName; double approxTime; goodSeq = readSeqMaybeMakeFrame(goodName, nullModel); goodSeqListSize = slCount(goodSeq); goodSeqElSize = uniformSeqSize(goodSeq, leftAlign, nullModel); goodSeqNameSize = maxSeqNameSize(goodSeq); makeTempName(&tn, "imp", ".pfl"); fprintf(htmlOut, "

Looking for %d motifs in %d sequences. Longest sequence is %d bases.

\n", numMotifs, goodSeqListSize, goodSeqElSize); -fprintf(htmlOut, "

Settings are %s location; %sinclude reverse complement; %d occurrences per sequence; %s align; ", - (useLocation ? "use" : "ignore"), +fprintf(htmlOut,"

Settings are %s location; %sinclude reverse complement; %d occurrences " + "per sequence; %s align; ", (useLocation ? "use" : "ignore"), (considerRc ? "" : "don't "), maxOcc, (leftAlign ? "left" : "right") ); fprintf(htmlOut, "restrain expansionist tendencies %f; number of sequences in initial scan %d; ", constrainer, startScanLimit); backgroundName = bgSource; if (backgroundName == NULL) backgroundName = badName; if (backgroundName == NULL) backgroundName = "same as foreground"; fprintf(htmlOut, "background model %s; background data %s;

", (nullModelCgiName == NULL ? "Markov 0" : nullModelCgiName), backgroundName); approxTime = calcApproximateTime(considerRc); progress("This run would take about %2.2f minutes on a lightly loaded vintage 2003 web server.",