예제 #1
0
파일: place.py 프로젝트: gahoo/pyCoMo
 def __init__(self, dbfile):
     if not os.path.exists(dbfile):
         #若不存在数据库则新建之
         sqlitedb.__init__(self, dbfile)
         self.newDB(dbfile)
     else:
         sqlitedb.__init__(self, dbfile)
         self.loadDB()
예제 #2
0
파일: united_db.py 프로젝트: gahoo/pyCoMo
 def __init__(self, dbfile):
     self.dbname = ".".join(dbfile.split(".")[:-1])
     self.dbpath = os.path.abspath(dbfile)
     if not os.path.exists(dbfile):
         #若不存在数据库则新建之
         sqlitedb.__init__(self, dbfile)
         self.newDB(dbfile)
     else:
         sqlitedb.__init__(self, dbfile)
         self.loadDB()
예제 #3
0
파일: plantcare.py 프로젝트: gahoo/pyCoMo
 def __init__(self, dbfile):
     '''
     dbfile数据库文件路径
     '''
     self.dbfile = dbfile
     if not os.path.exists(dbfile):
         #若不存在数据库则新建之
         sqlitedb.__init__(self, dbfile)
         self.newDB(dbfile)
     else:
         sqlitedb.__init__(self, dbfile)
         self.loadDB()
예제 #4
0
파일: CAREdb.py 프로젝트: gahoo/SearchCARE
 def __init__(self, dbfile):
     '''
     dbfile数据库文件路径
     '''
     self.dbfile=dbfile
     if not os.path.exists(dbfile):
         #若不存在数据库则新建之
         sqlitedb.__init__(self, dbfile)
         self.newDB(dbfile)
     else:
         sqlitedb.__init__(self, dbfile)
         #加载数据库表的内容到属性中
         self.SeqName=self.loadDB2dict('fa_file',1,0)
         self.Motif=self.loadDB2dict('Motif',1,0)
         self.MotifSeq=self.loadDB2dict('MotifSeq',1,0)
         #FoundMotif要加载太慢,数量太大了
         #self.FoundMotif=self.loadDB2dict('FoundMotif',1,0)
         self.Organism=self.loadDB2dict('Organism', 1, 0)
         self.Motif=self.loadDB2dict('Motif', 1, 0)
         self.Motif_Counts=self.loadDB2dict('Motif_Counts', 0, 1)
         self.CoMotif_Counts=self.loadCoMotif()