6c3389d97b58ad04533a072efa1858dcadcf00e1 max Thu Jun 1 09:22:08 2017 -0700 allowing default gene and removing assembly if not known, refs #13634 diff --git src/hg/hgGeneGraph/hgGeneGraph src/hg/hgGeneGraph/hgGeneGraph index b1745b7..f153ff6 100755 --- src/hg/hgGeneGraph/hgGeneGraph +++ src/hg/hgGeneGraph/hgGeneGraph @@ -215,33 +215,34 @@ .tooltip.right { margin-left: 20px; } .tooltip.left { margin-left: -20px; } """) def htmlHeader(): " print start of page " webStartGbNoBanner("", "Genome Browser Gene Interaction Graph") print('') printMenuBar() - db = getCgiVar("db", "hg19") - printHgcHeader(db, "Protein Interactions Track", "Protein interactions and pathways from curated databases and text-mining", addGoButton=False, infoUrl=MANUALURL) - + db = getCgiVar("db") + printHgcHeader(db, "Protein Interactions Track", + "Protein interactions and pathways from curated databases and text-mining", + addGoButton=False, infoUrl=MANUALURL, infoMouseOver="Open help page") def mustBeClean(str): """ make sure a string contains only letters and digits """ if str==None: return str str = urllib.unquote(str) str = str.strip() for s in str: if s not in legalChars: errAbort("illegal character in CGI parameter") return str def getCgiVar(name, default=None, allowAnyChar=False, maxLen=30): @@ -931,31 +932,31 @@ def printDropdown(cgiArgName, selectedName, options, addStr=""): " print a html dropdown " % (cgiArgName, addStr)) for name, label in options: addStr = "" if name==selectedName: addStr = " selected" print('' % (name, addStr, label)) print("") def printFilterMenu(targetGene, addNeighbors): # form to filter by type print "" print '
' % makeSelfUrl({}, True) - print """Gene:""" + print """Gene:""" print '' % targetGene print " " print '' print "   " supportLevel = getCgiVar("supportLevel", "text") if supportLevel not in ["text", "pwy", "ppi"]: errAbort("Illegal value for the supportLevel argument. Can only be text,pwy or ppi.") onChangeAttr = '''onchange="document.forms['filterForm'].submit();"''' printDropdown("supportLevel", supportLevel, [("text", "Show all interactions, even only text-mining support"), ("ppi", "Show only interactions with some database support"), ("pwy", "Show only interactions with pathway database support")], addStr=onChangeAttr ) #filterTags = getFilterStatus() @@ -967,37 +968,37 @@ #printCheckbox("text", "text" in filterTags, onChangeAttr) #print 'Text-Mining' % TEXTCOLOR print "       " #if addNeighbors: #addNeighborLink = makeSelfLink("Show only %s links" % targetGene, {"onlyDirect":"1"}) #print("Only %s-interacting genes and only the most-mentioned interactions are shown. (%s)
" % (targetGene, noNeighborLink)) #else: #addNeighborLink = makeSelfLink("Show links between neighbors", {"onlyDirect":None}) #print("Only %s interactions are shown (%s)
" % (targetGene, addNeighborLink)) #print(addNeighborLink) hideIndirectStatus = (getCgiVar("hideIndirect")=="on") printCheckbox("hideIndirect", hideIndirectStatus, onChangeAttr) - print 'Hide non-%s interactions' % targetGene + print 'Hide non-%s interactions' % targetGene print "   " geneCount = getCgiVar("geneCount", DEFGENECOUNT) - print "Show top" + print "Show top" print '' % geneCount - print "Genes on graph" + print "Genes on graph" print "   " printSelfHiddenVars({}, skipList=["supportLevel", "hideIndirect", "gene"]) print "
" print "
" def printDropDownMenu(label, entries, tooltip, selectedLabel=None): " output bootstrap dropdown menu of links " print print('') if tooltip is not None: print('