f166a0eed5d49f1a2ee3e1385ca7ee9b316fd736 kate Wed Mar 16 22:15:42 2011 -0700 Schema changes: add lastUpdate time, rename vars to factors to distinguish from mdbVars. Change accession format to be clearer to end-users. Extend 'find' and 'add' to check if already experiment is already present. Add lib routines to update entries in a limited fashion. diff --git src/hg/inc/mdb.h src/hg/inc/mdb.h index 1d73480..9d217a4 100644 --- src/hg/inc/mdb.h +++ src/hg/inc/mdb.h @@ -80,30 +80,37 @@ #define mdbTabOut(el,f) mdbOutput(el,f,'\t','\n'); /* Print out mdb as a line in a tab-separated file. */ #define mdbCommaOut(el,f) mdbOutput(el,f,',',','); /* Print out mdb as a comma separated list including final comma. */ void mdbJsonOutput(struct mdb *el, FILE *f); /* Print out mdb in JSON format. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ #include "trackDb.h" #define MDB_DEFAULT_NAME "metaDb" +/* These are needed for experiment table to understand a few + * critical metaDb typeOfTerms. Need someway to tie to cv.ra */ + +#define MDB_FIELD_LAB "lab" +#define MDB_FIELD_DATA_TYPE "dataType" +#define MDB_FIELD_CELL_TYPE "cell" + /* metaDb project used for production ENCODE */ // TODO: move to ENCODE-specific mdb header file when it exists #define ENCODE_MDB_PROJECT "wgEncode" // The mdb holds metadata primarily for tables. // Many types of objects could be supported, though currently files are the only other type. // It is easy to imagine using the current mdb to support hierarchical trees of metadata. // For example a composite type object called "myComposte" could have metadata that is valid for // all tables that have the var=composite val=myComposte metadata defined. // // There are 2 ways to look at the metadata: By Obj: obj->[var=val] and By Var: var->[val->[obj]]. // By Obj: an object has many var/val pairs but only one val for each unique var. Querying by // object creates a single (2 level) one to many structure. // By Var: a variable has many possible values and each value may be defined for more than one object. // Therefore, querying by var results in a (3 level) one to many to many structure.