Skip to content
Snippets Groups Projects
Commit 6621c028 authored by nfontrod's avatar nfontrod
Browse files

src/db_utils/__main__.py

parent a00438bd
No related branches found
No related tags found
No related merge requests found
......@@ -6,19 +6,22 @@
Description: Populate the gin database
"""
from .config import Config, logging_def
from .creation_of_exon_table import get_ctrl, get_exon_table
from .create_freq_table import create_freq_table
from .populate_database import populate
from .config import Config
from ..logging_conf import logging_def
from .db_creation import main_create_db
# from .creation_of_exon_table import get_ctrl, get_exon_table
# from .create_freq_table import create_freq_table
# from .populate_database import populate
import logging
def launcher(logging_level: str = "INFO"):
"""
Fill the database
Create and fill the database
"""
logging_def(Config.output, "INFO")
Config.output.mkdir(exist_ok=True)
logging_def(Config.output, __file__, logging_level)
logging.info('Database creation')
main_create_db()
# logging.info(f"Creation of {Config.ctrl_exon_file} file")
# get_ctrl(Config.exon_intern)
# logging.info(f"Creation of {Config.exon_file} file")
......@@ -27,13 +30,13 @@ def launcher(logging_level: str = "INFO"):
# create_freq_table(Config.bed_orf, Config.bed_exon, Config.ctrl_exon_file,
# logging_level)
#
mpopulate = populate.__wrapped__
# mpopulate = populate.__wrapped__
# logging.info(f"Filling {Config.tables[0]} table")
# mpopulate(Config.tables[0], Config.gene_file, "y", logging_level)
# logging.info(f"Filling {Config.tables[1]} table")
# mpopulate(Config.tables[1], Config.exon_file, "y", logging_level)
logging.info(f"Filling {Config.tables[2]} table")
mpopulate(Config.tables[2], Config.frequency_file, "y", logging_level)
# logging.info(f"Filling {Config.tables[2]} table")
# mpopulate(Config.tables[2], Config.frequency_file, "y", logging_level)
launcher(logging_level = "DEBUG")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment