cde9f0ada674da7c8896a49d38645e2248eeb0b7
max
Mon Jun 30 06:26:21 2025 -0700
fixing small hgGeneGraph bug, refs #35391
diff --git src/hg/hgGeneGraph/hgGeneGraph src/hg/hgGeneGraph/hgGeneGraph
index f7a1ad401c0..cee5e678d49 100755
--- src/hg/hgGeneGraph/hgGeneGraph
+++ src/hg/hgGeneGraph/hgGeneGraph
@@ -1653,31 +1653,31 @@
#centralDb = cfgOption("central.db")
#blackList = set()
#rows = sqlQuery(conn, "SELECT causeGene, themeGene, pmid from %s.ggFeedback" % centralDb)
#for row in rows:
#blackList.add( (row.causeGene, row.themeGene, str(row.pmid)) )
#return blackList
def queryEventText(conn, gene1, gene2):
" return rows from the ggEventText table "
gene1, gene2 = sorted([gene1, gene2])
q = "SELECT ggEventText.*, "\
"ggDoc.authors, ggDoc.title, ggDoc.journal, ggDoc.year, ggDoc.context, ggDoc.resCount " \
"FROM ggLinkEvent, ggEventText " \
"JOIN ggDoc ON (ggDoc.docId=ggEventText.docId) " \
"WHERE gene1='%s' and gene2='%s' AND ggEventText.eventId=ggLinkEvent.eventId " \
- "ORDER BY ggDoc.docId REVERSE LIMIT %d" % (gene1,gene2,MAXSNIPPETS)
+ "ORDER BY ggDoc.docId DESC LIMIT %d" % (gene1,gene2,MAXSNIPPETS)
rows = sqlQuery(conn, q)
return rows
def htmlInteraction(gene1, gene2):
" return html: two genes separated by an arrow from g1 to g2, with links to hgGeneGraph "
return '%s → %s' % (gene1, gene1, gene2, gene2)
def prettyDocLinks(conn, pmids):
" given a list of pmids, return a list of nice links to articles on our own site "
quoteList = ['"%s"' % pmid for pmid in pmids]
idStr = "(%s)" % (",".join(quoteList))
# XX remove distinct if not needed anymore
query = "SELECT authors, title, journal, year, docId, resCount FROM ggDoc WHERE docId IN %s" % idStr
rows = sqlQuery(conn, query)