24302c51b7a95f59436da8eb263b10706bc0ab9a kent Fri Jan 22 04:14:24 2021 -0800 Reducing verbosity of status output. diff --git src/hca/hcaUnifyMatrix/hcaUnifyMatrix.c src/hca/hcaUnifyMatrix/hcaUnifyMatrix.c index b02a8f6..2346a8b 100644 --- src/hca/hcaUnifyMatrix/hcaUnifyMatrix.c +++ src/hca/hcaUnifyMatrix/hcaUnifyMatrix.c @@ -317,30 +317,31 @@ fprintf(f, "%s %s\n", uni->name, line); } } lineFileClose(&lf); } carefulClose(&f); } void writeOneGraph(struct txGraph *g, struct uniInput *uniList, struct hash *uniHash, FILE *f, FILE *bedF) /* Here we write out one graph. Normally just write in one piece, but * we will at least snoop for those that need breaking up */ { +verbose(3, "writeOneGraph %s with %d sources\n", g->name, g->sourceCount); /* Find best txSource and it's associated type. */ int i; struct txSource *bestTxSource = NULL; int bestPriority = BIGNUM; // priority is better at 1 than 2 for (i=0; i<g->sourceCount; ++i) { struct txSource *txSource = &g->sources[i]; struct uniInput *uni = hashMustFindVal(uniHash, txSource->type); if (bestPriority > uni->priority) { bestPriority = uni->priority; bestTxSource = txSource; } txSource += 1; } @@ -354,31 +355,30 @@ { struct txSource *txSource = &g->sources[i]; if (sameString(txSource->type, bestType)) { if (bedF != NULL) { char **row = hashMustFindVal(rowHash, txSource->accession); writeTsvRow(bedF, BED12_NAME2_SIZE, row); } /* Output matrix */ struct uniInput *uni; struct bed *bestBed = hashMustFindVal(bestUni->bedHash, txSource->accession); for (uni = uniList; uni != NULL; uni = uni->next) { - if (bestBed != bestBed) uglyAbort("Absurd!"); struct txSource *ourSource = findBestSource(g, bestBed, uni); if (ourSource != NULL) { char *geneName = ourSource->accession; struct hashEl *hel = hashLookup(uni->matrixHash, geneName); if (hel == NULL) errAbort("Can't find %s in %s but it is in %s\n", geneName, uni->matrixFile, ourSource->type); int y = ptToInt(hel->val); int x; for (x=0; x<uni->matrix->xSize; ++x) { fprintf(f, "\t%g", uni->scaleOut*uni->matrix->rows[y][x]); } } else @@ -403,33 +403,33 @@ verbose(1, "Read %d graphs from %s\n", slCount(gList), graphInput); int typeCount = countDistinctTypes(gList); int minSources = typeCount/2; verbose(1, "%d distinct sources of evidence in %s\n", typeCount, graphInput); struct uniInput *uni, *uniList = uniInputLoadAll(inList); struct hash *uniHash = hashNew(0); verbose(1, "Read %d inputs from %s\n", slCount(uniList), inList); int totalColumns = 0; for (uni = uniList; uni != NULL; uni = uni->next) { hashAdd(uniHash, uni->mappingBed, uni); loadMappingBed(uni); - verbose(1, "%d genes in %s\n", uni->bedHash->elCount, uni->mappingBed); + verbose(2, "%d genes in %s\n", uni->bedHash->elCount, uni->mappingBed); loadMatrix(uni); - verbose(1, "%d genes and %d samples in %s\n", + verbose(2, "%d genes and %d samples in %s\n", uni->matrix->ySize, uni->matrix->xSize, uni->matrixFile); totalColumns += uni->matrix->xSize; } verbose(1, "Output will be %d columns\n", totalColumns); /* Open output and write out header row */ FILE *f = mustOpen(outMatrix, "w"); fprintf(f, "#hcaUnifyMatrix"); for (uni = uniList; uni != NULL; uni = uni->next) { struct memMatrix *mm = uni->matrix; int x; for (x=0; x<mm->xSize; ++x) { fprintf(f, "\t%s %s", uni->name, mm->xLabels[x]);