def setUpClass(self):
self.TESTDB_URI = "postgresql+psycopg2://@:5432/mafend2end"
if not database_exists(self.TESTDB_URI):
create_database(self.TESTDB_URI)
engine = create_engine(self.TESTDB_URI)
models.bind_engine(engine)
self.config_path = os.path.join(os.path.realpath(
sys.argv[-1]), "utils/example_configs/icgc_config.json")
with open(self.config_path, 'r') as readFP:
config_json = json.load(readFP)
config_json["TileDBConfig"] = os.path.join(os.path.realpath(
sys.argv[-1]), "utils/example_configs/tiledb_config.json")
config_json["TileDBAssembly"] = os.path.join(
os.path.realpath(sys.argv[-1]), "utils/example_configs/hg19.json")
config_json["VariantSetMap"]["VariantConfig"] = os.path.join(
os.path.realpath(sys.argv[-1]), "utils/example_configs/icgc_variants.json")
with open(self.config_path, 'w') as writeFP:
writeFP.write(json.dumps(config_json))
config = ConfigReader(self.config_path)
config.DB_URI = self.TESTDB_URI
imp.helper.registerWithMetadb(config)
评论列表
文章目录