ecb21defee4e9278c2d6b80036e2fc7ab1f9f838 max Fri Jun 30 06:50:47 2023 -0700 more fixes for hgGeneGraph, refs #31563 diff --git src/hg/hgGeneGraph/hgGeneGraph src/hg/hgGeneGraph/hgGeneGraph index b5df5d0..a05d236 100755 --- src/hg/hgGeneGraph/hgGeneGraph +++ src/hg/hgGeneGraph/hgGeneGraph @@ -1,19 +1,20 @@ #!/usr/bin/env python3 # Gene Interaction Viewer for the Genome Browser + # query tables with prefix "gg" in hgFixed, writes the results to a dot file, # runs graphviz's "dot" program to create a pathway map from it and write html # and mapfiles to the trash directory. # CGI params: gene=(HGNCsymbol) or link=sym1:sym2 # optional params: addNeighbors # colors: # grey+thickness = only text mining data # light blue, dashed = only high-throughput data # light blue, thickness = high-throughput data + text # dark blue, dashed = only low-throughput data @@ -1219,33 +1220,31 @@ # text above graph print("Mouse over or click genes or lines for details. Dashed lines indicate interactions without text mining support. ") print("Click any gene to make it the new center. Click any line to show details about the interaction. ") print(("Only %s-interacting genes and only the most-mentioned/most-curated interactions are shown in the graph. " % (targetGene))) print("See the Help Page for details.
") # menu above graph # background #fffef5 would be an alternive print('
') printGraphMenu(conn, targetGene, addNeighbors) print("

") # graph itself print('' % picName) mapData = open(mapName, "rb").read() - sys.stdout.flush() - sys.stdout.buffer.write(mapData) # only way to get binary data to stdout. Problem may be that data is mixed latin1/utf8 in tables from Stanford - sys.stdout.flush() + print(mapData.decode("latin1")) # graphviz seems to use latin1 encoding for its output file? print('

') print("

") def printPmidSearchForm(): " print a little form that allows to search for a PMID " print("


") print("Search for a PMID: ") print('
') print(' ') print(' ') print('

') def printDisclaimer(): print(''' @@ -1464,30 +1463,37 @@ if eType == "family": geneStr = "/".join(eGenes) if eName=="": return "%s" % geneStr else: return "%s (%s)" % (eName, geneStr) def printDbRows(conn, rows, onlyDoc=None): " print a row from the ggEventDb table as html " print('