70df6b8e2e7fcf8e6895c1182f9f4fd5709c3266 kate Tue Apr 12 23:06:26 2011 -0700 Remove duplicate definition of default experiment table name diff --git src/hg/lib/mdb.c src/hg/lib/mdb.c index 6546451..8e1c103 100644 --- src/hg/lib/mdb.c +++ src/hg/lib/mdb.c @@ -2653,32 +2653,30 @@ // returns NULL or the Experiment Defining Variables and values for this composite member object // If includeNone, then defined variables not found in obj will be included as {var}="None". { // In rare cases, the EDVs reside with the object and NOT in a objType=composite. struct slName *compositeEdvs = mdbObjGetNamedEncodeEdvs(mdbObj); // looking locally first. if (compositeEdvs == NULL) { compositeEdvs = mdbObjFindCompositeNamedEncodeEdvs(conn,tableName,mdbObj); if (compositeEdvs == NULL) return NULL; } return mdbObjEncodeEdvsAsMdbVars(mdbObj,compositeEdvs,includeNone); } -#define EXPERIMENTS_TABLE "hgFixed.encodeExp" - struct mdbObj *mdbObjsEncodeExperimentify(struct sqlConnection *conn,char *db,char *tableName,struct mdbObj **pMdbObjs, int warn,boolean createExpIfNecessary) // Organizes objects into experiments and validates experiment IDs. Will add/update the ids in the structures. // If warn=1, then prints to stdout all the experiments/obs with missing or wrong expIds; // warn=2, then print line for each obj with expId or warning. // createExpIfNecessary means go ahead and add to the hgFixed.encodeExp table to get an ID // Returns a new set of mdbObjs that is what can (and should) be used to update the mdb via mdbObjsSetToDb(). { // Here is what "experimentify" does from "mdbPrint -encodeExp" and "mdbUpdate -encodeExp": // - Uses normal selection methods to get a set of objects (e.g. one composite worth) or all objs. (in mdbPrint and mdbUpdate) // - This API: // - Breaks up and walks through set of objects composite by composite // - Looks up EDVs (Experiment Defining Variables) for composite. // These are defined in the mdb under objType=composite expVars= // - Breaks up and walks through composite objects exp by exp as defined by EDVs @@ -2830,31 +2828,31 @@ // Look up each exp in EXPERIMENTS_TABLE char experimentId[128]; int expId = -1; struct encodeExp *exp = encodeExpGetByMdbVars(db, edvVarVals); if (exp == NULL && createExpIfNecessary) exp = encodeExpGetOrCreateByMdbVars(db, edvVarVals); mdbVarsFree(&edvVarVals); // No longer needed if (exp != NULL) expId = exp->ix; if (expId == -1) { safef(experimentId,sizeof(experimentId),"{missing}"); if (warn > 0) - printf("Experiment %s EDV: [%s] is not defined in %s table.\n",experimentId,dyStringContents(dyVars),EXPERIMENTS_TABLE); + printf("Experiment %s EDV: [%s] is not defined in %s.%s table.\n",experimentId,dyStringContents(dyVars), ENCODE_EXP_DATABASE, ENCODE_EXP_TABLE); //printf("Experiment %s EDV: [%s] is not defined in %s table. Remaining:%d and %d\n",experimentId,dyStringContents(dyVars),EXPERIMENTS_TABLE,slCount(mdbCompositeObjs),slCount(mdbObjs)); if (warn < 2) // From mdbUpdate (warn=1), just interested in testing waters. From mdbPrint (warn=2) list all objs in exp. { expMissing++; mdbProcessedObs = slCat(mdbProcessedObs,mdbExpObjs); mdbExpObjs = NULL; encodeExpFree(&exp); continue; } } else { safef(experimentId,sizeof(experimentId),"%d",expId); if (warn > 0) printf("Experiment %s has %d objects based upon %d EDVs: [%s].\n",experimentId,slCount(mdbExpObjs),valsFound,dyStringContents(dyVars)); // Set the stage