Skip to content
Snippets Groups Projects
Commit c5f45776 authored by alapendr's avatar alapendr
Browse files

__main__.py: update to integrate the filling of cin_exon_interaction and...

__main__.py: update to integrate the filling of cin_exon_interaction and cin_gene_interaction tables
parent cb667d1f
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,24 @@ from .frequency_scripts.create_n_fill_exon_frequency_file import \
fill_frequency_tables
import logging
from .projects_metadata.get_fill_metadata import fill_projects_table
import subprocess
def launch_features_interactions(opt: str):
"""
Allows to launch the script features_interactions.py:
- to determine which couples of genomic regions interact, e.g. exons or
genes, that for each ChIA-PET dataset
- to fill the cin_gene_interaction and cin_exon_interaction tables
:param opt: which genomic regions are we studying, --exon or --gene
"""
subprocess.check_call(f"for file in `ls {Config.chia_pet_files}" f"/*` ; "
f"do " f"basename_file=$(basename -s .bed " f"$file)"
f" ; " f"python -m "
f"src.db_utils.interactions.features_interactions "
"${basename_file} " f"{opt} ; done", shell=True,
stderr=subprocess.STDOUT)
def launcher(logging_level: str = "INFO"):
......@@ -32,6 +50,10 @@ def launcher(logging_level: str = "INFO"):
fill_frequency_tables(Config.cpu, 'DISABLE')
logging.info('Filling projects table')
fill_projects_table('DISABLE')
logging.info('Filling cin_exon_interaction table')
launch_features_interactions("--exon")
logging.info('Filling cin_gene_interaction table')
launch_features_interactions("--gene")
launcher(logging_level="DEBUG")
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