diff LocationFile.py @ 9:22fe0154fa54

added support for heterochromatic regions
author Richard Burhans <burhans@bx.psu.edu>
date Tue, 10 Jul 2012 11:41:22 -0400
parents 2c498d40ecde
children
line wrap: on
line diff
--- a/LocationFile.py	Wed Jun 20 14:02:30 2012 -0400
+++ b/LocationFile.py	Tue Jul 10 11:41:22 2012 -0400
@@ -57,3 +57,13 @@
                 return rval
         else:
             die( 'key "{0}" not found in location file {1}'.format( key, self.filename ) )
+
+    def get_values_if_exists( self, key ):
+        if key in self._map:
+            rval = self._map[key]
+            if len( rval ) == 1:
+                return rval[0]
+            else:
+                return rval
+        else:
+            return None