DBD: Transcription factor prediction database

Release 2.0
www.transcriptionfactor.org
Sequence ID search:
An error occured in context "Genome" cell "1.00"
in the section containing the code:
001 
002 
003 import dbd, sys
004 import re
005 
006 params = {}
007 for i in sys.argv[2:]:
008 	item = i.split(":", 1)
009 	if len(item) == 1:
010 		params[item[0]] = None
011 	else:
012 		params[item[0]] = item[1]
013 
014 
015 cellhead()
016  
017 
018 if params.has_key("gn") and params["gn"] != None:
019 	gn = params["gn"]
020 elif params.has_key("id") and params["id"] != None:
021 	gn = params["id"]
022 else:
023 	print "ERROR"
024 	cellbody()
025 	dbd.print_error_cell("No genome specified")
026 	sys.exit()
027 
028 info = dbd.get_genome_info(gn)
029 if not info:
030 	print "ERROR"
031 	cellbody()
032 	dbd.print_error_cell("Unknown genome: %s" %(gn))
033 	sys.exit()
034 
035 (name, tax, source, date) = info
036 
037 local = ""
038 
039 DOWNLOAD_DIR = "Download"
040 local_fasta = {"hs" : 1, "at" : 1, "ad" : 1, "cv" : 1, "kw" : 1}
041 if local_fasta.has_key(gn):
042 	local = """<tr><td align="center"><a href="%s/%s.fa.gz"> 
043 	local copy of protein fasta file</a></td></tr>""" %(DOWNLOAD_DIR, gn)
044 
045 print """
046 <table>
047 	<tr><td align="center"><b>%s</b></td></tr>
048 	<tr><td align="center">Taxonomy: %s</td></tr>
049 	<tr><td align="center"><a href="%s" target="blank">source</a> (downloaded: %s)</td></tr>
050 	%s
051 </table>
052 """ %(name, tax, source, date, local)
053 
054 
055 
056 cellbody()
057 
058 fly_reg_ex_res = re.search('Drosophila\ melanogaster', name)
059 
060 if fly_reg_ex_res != None:	
061 	print """<blockquote><p>A curated set of 753 Drosophila melanogaster TFs is available at <a href="http://www.flytf.org/">www.FlyTF.org</a>.<br></p></blockquote>"""
062 
063 opg_reg_ex_res = re.search('longest transcript per gene', name)
064 all_reg_ex_res = re.search('all transcripts', name)
065 low_cov_reg_ex_res = re.search('Low coverage', name)
066 
067 if opg_reg_ex_res != None:                    
068         print """<blockquote><p><font color=red>The longest transcript per gene genomes use the longest transcript as the single representative protein for each gene.</font><br></p></blockquote>"""
069 
070 if all_reg_ex_res != None:                    
071         print """<blockquote><p><font color=red>The all transcripts genomes include all the transcripts for each gene.</font><br></p></blockquote>"""
072 
073 if low_cov_reg_ex_res != None:                    
074         print """<blockquote><p><font color=red>The Low coverage genomes were sequenced to 2 times genome coverage or less.</font></p></blockquote>"""
075 
076 print """<blockquote><p> Each predicted transcription factor is displayed with its SUPERFAMILY (SF) as well as PFAM (PF) architecture. <br> """
077 print """ The domain architectures are represented as colored rectangles and oblongs on a black line corresponding to the polypeptide chain. <br> """
078 print """ The oblongs represent DNA-binding domains, and the rectangles represent domains with other functions. <br> """
079 print """ The numbers inside the SF rectangles represent the SF database identifier for that protein superfamily, and are linked to a detailed description. <br> """
080 print """ The PFAM identifiers inside the boxes are also linked to detailed descriptions of the family. <br> """
081 print """ The long family name can be viewed by holding the mouse over a colored rectangle. <br> """
082 print """ All the domains belonging to one family have the same colored rectangle. <br> """
083 print """ Colors are reused for different families, so that two different families can be represented by the same color. </p> """
084 print """ <p> The sequence ID links provide more detailed results for each predicted transcription factor. <br> """
085 print """ External links are also provided, when available. <br>"""
086 print """ Common gene names are provided for the model organisms: <i>Bacillus subtilis, Caenorhabditis elegans, Drosophila melanogaster, Escherichia coli, Homo sapiens, Mus musculus</i>, <i>Saccharomyces cerevisiae.</i> and <i>Salmonella typhimurium</i> LT2.</p>"""
087 print """<p"> The full repertoire of transcription factors may be distributed across several pages of results. <br> """
088 print """ These can be accessed by clicking on the individual page numbers, or downloading the entire set of results from the <a href="%s?Download">Download</a> section. </p><br></blockquote>""" % globals.HomeURLBase
089 
090 if params.has_key("page") and params["page"] and params.has_key("limit") and params["limit"]:
091 	page = int(params["page"])
092 	limit = dbd.RECORDS_PER_PAGE
093 	dbd.print_tfs_table(globals.HomeURLBase, globals.Context, dbd.IMAGE_GEN_DIR, dbd.tfs_by_gn, gn, "", limit, page)
094 elif params.has_key("limit") and params["limit"]:
095 	limit = int(params["limit"])
096 	dbd.print_tfs_table(globals.HomeURLBase, globals.Context, dbd.IMAGE_GEN_DIR, dbd.tfs_by_gn, gn, "", limit)
097 else:
098 	limit = dbd.RECORDS_PER_PAGE
099 	dbd.print_tfs_table(globals.HomeURLBase, globals.Context, dbd.IMAGE_GEN_DIR, dbd.tfs_by_gn, gn, "", limit)
100 
101 cellend()
102 
Traceback (most recent call last):
  File "/net/isilonP/public/rw/research/teichmann/apache/live/DBD/web.py", line 148, in gen_cell
    exec _code in _globals_d, _locals_d
  File "<string>", line 28, in <module>
  File "/net/isilonP/public/rw/research/teichmann/apache/live/DBD/dbd.py", line 489, in get_genome_info
    c = get_db_cursor()
  File "/net/isilonP/public/rw/research/teichmann/apache/live/DBD/dbd.py", line 68, in get_db_cursor
    db = MySQLdb.connect(host="mysql-teichmann-web.ebi.ac.uk", port=4412, user="admin", passwd="z2Kd6OvN", db="DBD2")
  File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on 'mysql-teichmann-web.ebi.ac.uk' (111)")