예제 #1
0
파일: color.py 프로젝트: diekhans/pycbio
 def __init__(self, r, g, b, h, s, v):
     """don't call directly use factory (from*) static methods, arguments are 0.0..1.0"""
     Immutable.__init__(self)
     self.__r = r
     self.__g = g
     self.__b = b
     self.__h = h
     self.__s = s
     self.__v = v
     self.mkImmutable()
예제 #2
0
파일: coords.py 프로젝트: diekhans/pycbio
 def __init__(self, *args, **kwargs):
     """args are either one argument in the form chr:start-end, or
     chr, start, end. options are db= and chromSize="""
     Immutable.__init__(self)
     if len(args) == 1:
         self.__parseCombined__(args[0])
     elif len(args) == 3:
         self.__parseThree__(args[0], args[1], args[2])
     else:
         raise CoordsError("Coords() excepts either one or three arguments")
     self.db = kwargs.get("db")
     self.chromSize = kwargs.get("chromSize")
     self.mkImmutable()
예제 #3
0
 def __init__(self, start, end, val):
     Immutable.__init__(self)
     self.start = start
     self.end = end
     self.val = val
     self.mkImmutable()
예제 #4
0
 def X__setstate__(self, st):
     Immutable.__init__(self)
     (self.name, self.aliases, self.values, self.maxNumValue) = st
     for val in self.values:
         setattr(self, val.name, val)
예제 #5
0
파일: frame.py 프로젝트: diekhans/pycbio
 def __init__(self, val=-1):
     Immutable.__init__(self)
     assert((val >= -1) and (val <= 2))
     self.val = val
     self.mkImmutable()
예제 #6
0
 def __init__(self, val):
     Immutable.__init__(self)
     self.val = val
     self.mkImmutable()