2fdb988d482d7928ad969a0e0c1706446b31846c
mmaddren
  Thu Jan 20 16:04:45 2011 -0800
updated ra scripts
diff --git python/ucscgenomics/rafile/radict.py python/ucscgenomics/rafile/radict.py
index a14f3a1..d75fdba 100644
--- python/ucscgenomics/rafile/radict.py
+++ python/ucscgenomics/rafile/radict.py
@@ -38,26 +38,36 @@
         if (key == None or key == ''):
             return
 
         del self._dictionary[key]
         self._ordering.remove(key)
 
     def getValue(self, key):
         if (key not in self._dictionary):
             print 'ERROR: RaDict.getValue() - KEY <' + key + '> does not exist'
             sys.exit(1) 
 
         return self._dictionary[key]
 
 class RaDict(_OrderedDict):
 
+    def addComment(self, comment):
+        if not comment.startswith('#'):
+            print 'ERROR: RaDict.addComment() - <' + comment + '> is not a comment'
+            sys.exit(1)
+
+        self._ordering.append(comment)
+
     def __str__(self):
         for key in self._ordering:
+            if key.startswith('#'):
+                print key
+            else:
             print self._dictionary[key]
         return ''
 
 class EntryDict(_OrderedDict):
 
     def __str__(self):
         for key in self._ordering:
             print key + ' ' + self._dictionary[key]
         return ''