Пример #1
0
int main(int argc, char *argv[])
{

if (argc != 2)
    usage();

snpDb = argv[1];
hSetDb(snpDb);
outputFileHandle = mustOpen("snpPAR.tab", "w");
exceptionFileHandle = mustOpen("snpPARexceptions.tab", "w");
getSnps();
getExceptions();
loadDatabase();
carefulClose(&outputFileHandle);
carefulClose(&exceptionFileHandle);

return 0;
}
Пример #2
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;
}