64f127cb71252486ce096a832ac7fad3deb324a5
mmaddren
  Wed Sep 14 17:04:53 2011 -0700
large-scale renaming change to allow python to be built into cluster/bin, also mkGeoPkg now renames files
diff --git python/lib/ucscgenomics/bed.py python/lib/ucscgenomics/bed.py
new file mode 100644
index 0000000..d7d09af
--- /dev/null
+++ python/lib/ucscgenomics/bed.py
@@ -0,0 +1,49 @@
+
+class BedLine(object):
+	
+	@property 
+	def chromosome(self):
+		"""The chromosome"""
+		return self._chromosome
+		
+	@property 
+	def start(self):
+		"""The start"""
+		return self._start
+		
+	@property 
+	def end(self):
+		"""The end"""
+		return self._end
+		
+	@property 
+	def name(self):
+		"""The file's name"""
+		return self._name
+	
+	def __init__(self, chromosome, start, end, name=None):
+		self._chromosome = chromosome
+		self._start = start
+		self._end = end
+		self._name = name
+
+class BedFile(object):
+
+	@property 
+	def lines(self):
+		"""asdf"""
+		return self._nodes
+
+	def __init__(self, filename):
+
+		self._nodes = list()
+	
+		for line in open(filename):
+			
+			line = line.strip()
+			if line == '':
+				continue
+			
+			vals = line.split('\t')
+			
+			self._nodes.append(BedLine(vals[0], int(vals[1]), int(vals[2]), vals[3]))