c6a8defa4b194591eeeeeaf2dff96a5a1122af65 tdreszer Thu Mar 24 16:53:38 2011 -0700 Minor change to the experimentifier output as requested by Cricket. diff --git src/hg/lib/mdb.c src/hg/lib/mdb.c index 0259e62..6317523 100644 --- src/hg/lib/mdb.c +++ src/hg/lib/mdb.c @@ -2695,44 +2695,55 @@ { // NOTE: This list could expand but we expect only tables and files to be objs in an experiment char *objType = mdbObjFindValue(obj,MDB_OBJ_TYPE); assert(objType != NULL && (sameString(objType,MDB_OBJ_TYPE_TABLE) || sameString(objType,MDB_OBJ_TYPE_FILE))); } boolean updateObj = FALSE; char *val = mdbObjFindValue(obj,MDB_VAR_ENCODE_EXP_ID); if (val != NULL) { foundId = TRUE; // warn==1 will give only 1 exp wide error if no individual errors. NOTE: would be nice if those with expId sorted to beginning, but can't have everything. int thisId = atoi(val); if (thisId == expId && expId != -1) { errors--; // One less error if (warn > 1) // NOTE: Could give more info for each obj as per wrangler's desires - printf(" %s obj='%s' has %s set.\n",experimentId,obj->obj,MDB_VAR_ENCODE_EXP_ID); + { + char *acc = mdbObjFindValue(obj,MDB_VAR_DCC_ACCESSION); + if (acc == NULL) + printf(" %s %s\n",experimentId,obj->obj); + else + printf(" %s %s %s set, needs %s.\n",experimentId,obj->obj,MDB_VAR_ENCODE_EXP_ID,MDB_VAR_DCC_ACCESSION); + } } else { updateObj = TRUE; if (warn > 0) - printf(" %s obj='%s' has bad %s=%s.\n",experimentId,obj->obj,MDB_VAR_ENCODE_EXP_ID,val); + printf(" %s %s has bad %s=%s.\n",experimentId,obj->obj,MDB_VAR_ENCODE_EXP_ID,val); } } else { updateObj = (expId != -1); if ((foundId && warn > 0) || warn > 1) - printf(" %s obj='%s' has no %s.\n",experimentId,obj->obj,MDB_VAR_ENCODE_EXP_ID); + { + if (updateObj) + printf(" %s %s needs updating to mdb.\n",experimentId,obj->obj); + else + printf(" %s %s\n",experimentId,obj->obj); // missing + } } // This object needs to be updated. if (updateObj) { mdbObjSetVarInt(obj,MDB_VAR_ENCODE_EXP_ID,expId); struct mdbObj *newObj = mdbObjCreate(obj->obj,MDB_VAR_ENCODE_EXP_ID, experimentId); assert(exp != NULL); if (exp->accession != NULL) mdbObjSetVar(newObj,MDB_VAR_DCC_ACCESSION,exp->accession); slAddHead(&mdbUpdateObjs,newObj); } slAddHead(&mdbProcessedObs,obj); } // Done with one experiment