source: patricktest.py @ 149

Last change on this file since 149 was 149, checked in by pvkouteren, 11 years ago

Minor fixes to ibidas2.py and setup_db.py
Added test file patricktest.py

  • Property svn:mime-type set to text/plain
File size: 900 bytes
Line 
1import container
2import parsers.utils
3import parsers.obo
4from container import iany,iall,readfile,writefile, postgres
5import config
6import os
7
8'''
9Adjusted:
10container.py: 628
11'''
12
13os.system("python setup_db.py y")
14
15_ConfigDefault = {
16    "database.name":                "ibidas",
17    "database.user":                "postgres",
18    "database.password":            "postgres",
19    "database.host":                "127.0.0.1",
20    "database.port":                "5432",
21}
22
23config = config.loadConfig('ibidas.ini',_ConfigDefault)
24
25cd = postgres.openConnection(config['database.host'],\
26            config['database.port'],config['database.name'],\
27            config['database.user'],config['database.password']).getConSet()
28
29cd.logger.log("Starting script")
30
31obo = parsers.obo.OboParser()
32o = obo.parse("GO", os.getcwd()+"/data/gene_ontology.1_2.obo")
33obof = parsers.obo.OboFlusher(cd, o)
34obof.flush()
Note: See TracBrowser for help on using the repository browser.