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/hgGene/synonym.c src/hg/hgGene/synonym.c index f217179..0a1249d 100644 --- src/hg/hgGene/synonym.c +++ src/hg/hgGene/synonym.c @@ -1,28 +1,29 @@ /* Synonym - print out other names for this gene. */ /* Copyright (C) 2013 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "hash.h" #include "hdb.h" #include "linefile.h" #include "dystring.h" #include "hgGene.h" #include "spDb.h" #include "ccdsGeneMap.h" +#include "genbank.h" static void printOurMrnaUrl(FILE *f, char *accession) /* Print URL for Entrez browser on a nucleotide. */ { fprintf(f, "../cgi-bin/hgc?%s&g=mrna&i=%s&c=%s&o=%d&t=%d&l=%d&r=%d&db=%s", cartSidUrlString(cart), accession, curGeneChrom, curGeneStart, curGeneEnd, curGeneStart, curGeneEnd, database); } static void printOurRefseqUrl(FILE *f, char *accession) /* Print URL for Entrez browser on a nucleotide. */ { fprintf(f, "../cgi-bin/hgc?%s&g=refGene&i=%s&c=%s&o=%d&l=%d&r=%d&db=%s", cartSidUrlString(cart), accession, curGeneChrom, curGeneStart, curGeneStart, @@ -328,38 +329,38 @@ if (sameWord(genome, "C. elegans")) hPrintf("<B>WormBase ID:</B> %s<BR>", id); else hPrintf("<B>UCSC ID:</B> %s<BR>", id); } if (refSeqAcc[0] != 0) { hPrintf("<B>RefSeq Accession: </B> <A HREF=\""); printOurRefseqUrl(stdout, refSeqAcc); hPrintf("\">%s</A><BR>\n", refSeqAcc); } else if (mrnaAcc[0] != 0) { sqlSafefFrag(condStr, sizeof(condStr), "acc = '%s'", mrnaAcc); - if (sqlGetField(database, "gbCdnaInfo", "acc", condStr) != NULL) + if (sqlGetField(database, gbCdnaInfoTable, "acc", condStr) != NULL) { hPrintf("<B>Representative RNA: </B> <A HREF=\""); printOurMrnaUrl(stdout, mrnaAcc); hPrintf("\">%s</A><BR>\n", mrnaAcc); } else - /* do not show URL link if it is not found in gbCdnaInfo */ + /* do not show URL link if it is not found in gbCdnaInfoTable */ { hPrintf("<B>Representative RNA: %s </B>", mrnaAcc); } } if (protAcc != NULL) { kgProteinID = cloneString(""); if (hTableExists(sqlGetDatabase(conn), "knownGene") && (isNotEmpty(curGeneChrom) && differentWord(curGeneChrom,"none"))) { sqlSafefFrag(condStr, sizeof(condStr), "name = '%s' and chrom = '%s' and txStart=%d and txEnd=%d", id, curGeneChrom, curGeneStart, curGeneEnd); kgProteinID = sqlGetField(database, "knownGene", "proteinID", condStr); }