示例#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()