[Bio] / FigKernelScripts / make_maps_from_sub.py Repository:
ViewVC logotype

Diff of /FigKernelScripts/make_maps_from_sub.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Wed Jun 16 16:08:20 2004 UTC revision 1.5, Mon Dec 5 18:56:37 2005 UTC
# Line 1  Line 1 
1    #
2    # Copyright (c) 2003-2006 University of Chicago and Fellowship
3    # for Interpretations of Genomes. All Rights Reserved.
4    #
5    # This file is part of the SEED Toolkit.
6    #
7    # The SEED Toolkit is free software. You can redistribute
8    # it and/or modify it under the terms of the SEED Toolkit
9    # Public License.
10    #
11    # You should have received a copy of the SEED Toolkit Public License
12    # along with this program; if not write to the University of Chicago
13    # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14    # Genomes at veronika@thefig.info or download a copy from
15    # http://www.theseed.org/LICENSE.TXT.
16    #
17    
18  from FigKernelPackages.FIG2 import FIG  from FigKernelPackages.FIG2 import FIG
19  import FIG_Config  import FIG_Config
20  import re  import re
# Line 67  Line 84 
84                  coords = {}                  coords = {}
85                  link_coords={}                  link_coords={}
86                  links = {}                  links = {}
87                    compounds = {}
88                  for aitem in areas:                  for aitem in areas:
89                          area, tag, value = aitem                          area, tag, value = aitem
90                          # print "area=%s tag=%s value=%s" % (area, tag, value)                          # print "area=%s tag=%s value=%s" % (area, tag, value)
91    
92                          if tag == "role":                          if tag == "role":
93                                  roles[area] = value                                  roles[area] = value
94                            if tag == "compound":
95                                    compounds[area] = value
96                          if tag == "shape":                          if tag == "shape":
97                                  shape_kind, shape_coords = value.split(":", 1)                                  shape_kind, shape_coords = value.split(":", 1)
98    
# Line 104  Line 124 
124                          role_coords.write(roles[area]+"\t"+coords[area]+"\n")                          role_coords.write(roles[area]+"\t"+coords[area]+"\n")
125                          if links.has_key(area):                          if links.has_key(area):
126                                  link_table.write('%s href="%s">\n' % (link_coords[area], links[area]))                                  link_table.write('%s href="%s">\n' % (link_coords[area], links[area]))
127                    for compound in compounds.keys():
128                    #for link in links.keys():
129                            #print "("+link+")", link_coords[compound], links[compound]
130                            if links.has_key(compound):
131                                    link_table.write('%s href="%s">\n' % (link_coords[compound], links[compound]))
132                  role_coords.close()                  role_coords.close()
133                  link_table.close()                  link_table.close()
134    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3