EngreitzLab / ENCODE_rE2G

Enhancer-Gene Prediction Pipeline based on logistic regression and ABC model
4 stars 0 forks source link

`write_powerlaw_params.py` tries to run `compute_powerlaw_fit_from_hic.py` from wrong location when called by `write_powerlaw_params.smk` #10

Closed owenyi2 closed 11 months ago

owenyi2 commented 11 months ago

When running the snakemake workflow, on K562 Chr22 example, I get this error python: can't open file '/home/oweyi/week_2/issue/encode_e2g_features/workflow/scripts/compute_powerlaw_fit_from_hic.py': [Errno 2] No such file or directory.

This occurs when my config_biosamples.tsv row contains HiC_dir, HiC_type, HiC_resolution but not HiC_gamma nor HiC_scale. My intention is that config should invoke compute_powerlaw_fit_from_hic.py to calculate, for the first run, the HiC parameters using the juicebox HiC folder.

This particular configuration triggers write_powerlaw_params.smk to run this shell command python ABC/workflow/scripts/write_powerlaw_params.py --hic_dir ABC/example_chr/HiC_K562 --hic_type juicebox --hic_resolution 5000 --output_file results/HiC_Powerlaw/fade7e41/hic.powerlaw.tsv.

Since HiC_gamma and HiC_scale are not provided, the script runs write_powerlaw_params.py > exec_compute_powerlaw_fit_script.

This function tries to run the python script compute_powerlaw_fit_from_hic.py from the encode_e2g_features/workflow/scripts folder rather than the correct encode_e2g_features/ABC/workflow/scripts folder.

The current workaround I'm using is to shove in the correct path in the write_powerlaw_params.py > exec_compute_powerlaw_fit_script function with __file__ dunder variable under the assumption that write_powerlaw_params.py and compute_powerlaw_fit_from_hic.py will be in the same folder.

Attached is the

atancoder commented 11 months ago

Repo has been updated. btw, we haven't really announced this repo as being ready as it's still in development