c8fef35d2c0f637727a648fed97fa95b1242a323 tdreszer Thu Jul 21 17:13:06 2011 -0700 Minor fixes to sizes of hash used by cv.ra diff --git src/lib/ra.c src/lib/ra.c index 7c3ce3d..69e6e7a 100644 --- src/lib/ra.c +++ src/lib/ra.c @@ -303,31 +303,31 @@ if (key == NULL) errAbort("Couldn't find key field %s line %d of %s", keyField, lf->lineIx, lf->fileName); hashAdd(bigHash, key, hash); } lineFileClose(&lf); return bigHash; } struct hash *raReadWithFilter(char *fileName, char *keyField,char *filterKey,char *filterValue) /* Return hash that contains all filtered ra records in file keyed by given field, which must exist. * The values of the hash are themselves hashes. The filter is a key/value pair that must exist. * Example raReadWithFilter(file,"term","type","antibody"): returns hash of hashes of every term with type=antibody */ { struct lineFile *lf = lineFileOpen(fileName, TRUE); -struct hash *bigHash = hashNew(0); +struct hash *bigHash = hashNew(6); struct hash *hash; while ((hash = raNextRecord(lf)) != NULL) { char *key = hashFindVal(hash, keyField); if (key == NULL) errAbort("Couldn't find key field %s line %d of %s", keyField, lf->lineIx, lf->fileName); if (filterKey != NULL) { char *filter = hashFindVal(hash, filterKey); if (filter == NULL) { hashFree(&hash); continue; }