void gbAlignDataInit(char *tmpDir, struct dbLoadOptions* options, struct sqlConnection *conn) /* initialize. called once per genbank type. tmpDirPath can be null to setup * just for deletion.*/ { if (alignTblSet == NULL) { assert(geneTblSet == NULL); alignTblSet = gbAlignTblSetNew(((options->flags & DBLOAD_PER_CHROM_ALIGN) != 0), ((options->flags & DBLOAD_ADD_VERSION) != 0), tmpDir); geneTblSet = gbGeneTblSetNew(tmpDir); } setDerivedTblFlags(conn, options); }
void gbMetaDataUpdateChgGenes(struct sqlConnection *conn, struct gbSelect *select, struct gbStatusTbl* statusTbl, char *tmpDir) /* update gene tables where annotations have changed but sequence * has not changes and is not being reloaded */ { if (partitionMayHaveGeneTbls(select)) { struct gbGeneTblSet *ggts = gbGeneTblSetNew(tmpDir); struct gbStatus* status; for (status = statusTbl->metaChgList; status != NULL; status = status->next) { if (inGeneTbls(status) && !(status->stateChg & GB_SEQ_CHG)) updateGeneEntries(conn, ggts, status, select->hasVersion); // ext chg or rebuild derived } gbGeneTblSetCommit(ggts, conn); gbGeneTblSetFree(&ggts); } }