void checkSgdSync(char *downloadDir) /* checkSgdSync - Make sure that genes and sequence are in sync for * SGD yeast database. */ { struct hash *chromHash; char path[PATH_LEN]; safef(path, sizeof(path), "%s/%s", downloadDir, "chromosomes"); chromHash = loadChroms(path); safef(path, sizeof(path), "%s/%s", downloadDir, gffFile); checkGff(path, chromHash); }
int main(int argc, char *argv[]) /* read ContigLocFilter, writing to individual chrom tables */ { struct hashCookie cookie; struct hashEl *hel; char *chromName; if (argc != 3) usage(); snpDb = argv[1]; contigGroup = argv[2]; hSetDb(snpDb); /* check for needed tables */ if(!hTableExistsDb(snpDb, "ContigLocFilter")) errAbort("no ContigLocFilter table in %s\n", snpDb); if(!hTableExistsDb(snpDb, "ContigInfo")) errAbort("no ContigInfo table in %s\n", snpDb); chromHash = loadChroms(contigGroup); if (chromHash == NULL) { verbose(1, "couldn't get chrom info\n"); return 1; } writeSplitTables(); verbose(1, "closing files...\n"); cookie = hashFirst(chromHash); while (hel = hashNext(&cookie)) fclose(hel->val); verbose(1, "creating tables...\n"); cookie = hashFirst(chromHash); while ((chromName = hashNextName(&cookie)) != NULL) createTable(chromName); verbose(1, "loading database...\n"); cookie = hashFirst(chromHash); while ((chromName = hashNextName(&cookie)) != NULL) { verbose(1, "chrom = %s\n", chromName); loadDatabase(chromName); } return 0; }
int main(int argc, char *argv[]) { char *snpDb = NULL; char *snpTableName = NULL; struct hashCookie cookie; char *chromName = NULL; if (argc != 3) usage(); snpDb = argv[1]; hSetDb(snpDb); snpTableName = argv[2]; /* check that tables exist */ if (!hTableExists(snpTableName)) errAbort("no %s table in %s\n", snpTableName, snpDb); if (!hTableExists("chromInfo")) errAbort("no chromInfo table in %s\n", snpDb); loadChroms(); getSnps(snpTableName); verbose(1, "creating tables...\n"); cookie = hashFirst(chromHash); while ((chromName = hashNextName(&cookie)) != NULL) createTable(chromName); verbose(1, "loading database...\n"); cookie = hashFirst(chromHash); while ((chromName = hashNextName(&cookie)) != NULL) { verbose(1, "chrom = %s\n", chromName); loadDatabase(chromName); } return 0; }