aba8125cb532df17beb7c7c9bc8467a43d09e3d6 braney Wed Feb 10 13:39:27 2016 -0800 changes to allow for GenBank metadata to be held in a common table. #16809 diff --git src/hg/lib/geneGraph.c src/hg/lib/geneGraph.c index 58bd12c..6ea785f 100644 --- src/hg/lib/geneGraph.c +++ src/hg/lib/geneGraph.c @@ -5,31 +5,31 @@ *****************************************************************************/ /* geneGraph - Relatively short, high level routines for using * (but not necessarily creating) a geneGraph. A geneGraph * is a way of representing possible alt-splicing patterns * of a gene. */ #include "common.h" #include "dnautil.h" #include "dnaseq.h" #include "geneGraph.h" #include "ggPrivate.h" #include "altGraphX.h" #include "geneGraph.h" #include "dystring.h" - +#include "genbank.h" void ggEvidenceFree(struct ggEvidence **pEl) /* Free a single dynamically allocated ggEvidence */ { struct ggEvidence *el; if ((el = *pEl) == NULL) return; freez(pEl); } void ggEvidenceFreeList(struct ggEvidence **pList) /* Free a list of dynamically allocated ggEvidence's */ { struct ggEvidence *el, *next; @@ -412,31 +412,31 @@ { struct slInt *library = NULL, *tissue=NULL; library = hashMustFindVal(tissLibHash, gg->mrnaRefs[i]); gg->mrnaLibs[i] = library->val; tissue = library->next; assert(tissue); gg->mrnaTissues[i] = tissue->val; } else { struct sqlResult *sr = NULL; char **row = NULL; char query[256]; assert(gg->mrnaRefs[i]); - sqlSafef(query, sizeof(query), "select library, tissue from gbCdnaInfo where acc='%s'", gg->mrnaRefs[i]); + sqlSafef(query, sizeof(query), "select library, tissue from %s where acc='%s'", gbCdnaInfoTable, gg->mrnaRefs[i]); sr = sqlGetResult(conn, query); row = sqlNextRow(sr); if(row == NULL) errAbort("geneGraph.c::ggFillInTissuesAndLibraries() - Couldn't load library and tissue info for est: %s using query:\n%s", gg->mrnaRefs[i], query); gg->mrnaLibs[i] = sqlSigned(row[0]); gg->mrnaTissues[i] = sqlSigned(row[1]); sqlFreeResult(&sr); } } } boolean isSameGeneGraph(struct geneGraph *gg1, struct geneGraph *gg2) /* Returns true if the gene graphs are the same, otherwise returns false. */ { boolean allOk = TRUE;