Vini2 / phables

🫧🧬 From fragmented assemblies to high-quality bacteriophage genomes
https://phables.readthedocs.io/
MIT License
74 stars 6 forks source link

[BUG] Error when running "phables run" #30

Closed ilnamkang closed 9 months ago

ilnamkang commented 12 months ago

Describe the bug I encountered an error when running phables run. I don't know what is the main error. According to screen output, the error may be "Pip subprocess error", "CondaEnvException: Pip failed", or else. Note that the phables installed in the last month (15, September) is running without any error. But, the version installed today (6, October) is not working with the error.

To Reproduce

  1. Command executed mamba create -n phables -c conda-forge -c anaconda -c bioconda phables mamba activate phables mamba install -c gurobi gurobi phables install cp -p <path-to>/miniconda3/envs/phables/lib/python3.10/site-packages/phables/config/config.yaml ./phables.out phables install phables run --input assembly.gfa --reads fastq/ --threads 72

Note that phables install was run twice due to another error https://github.com/Vini2/phables/issues/29. Also note that gurobi license had been already installed in this system.

  1. Error message Because the error messages is very long, I leave a link for the log file produced by the command below. phables run --input assembly.gfa --reads fastq/ --threads 72 > phables.log 2>&1 https://drive.google.com/file/d/1Bl_8SzZUeLx5VJV5f-_t-Lff6CR1qUOK/view?usp=sharing

Expected behavior Running without any errors with input data.

Desktop (please complete the following information):

Vini2 commented 12 months ago

Hi @ilnamkang,

Thanks for your interest in phables! Can you please tell me what versions of python, pip, mamba and phables gets installed? You can get this info using mamba info --env after activating the phables environment.

beardymcjohnface commented 12 months ago

I think the issue here is Conda's pip support is very unreliable. I only just added Koverage to bioconda, you will be able to test the PR fixes tomorrow after bioconda's nightly build.

Vini2 commented 12 months ago

Hi @ilnamkang,

We have added a new release of phables on bioconda. Can you please try the new version and let me know if this problem persists?

Thanks!

ilnamkang commented 12 months ago

Hi @Vini2,

The new release works without any errors. Another error (https://github.com/Vini2/phables/issues/29) is also resolved in this release.

Thank you for your quick response!

GeoMicroSoares commented 10 months ago

Hi there - running phables 1.2.1 I still get this error - specifically:

$phables run --input mgshot_S7938Nr1.gfa --reads raw.d_changed/ --threads 1
[2023:12:05 16:23:06] Config file phables.out/config.yaml already exists. Using existing config file.
[2023:12:05 16:23:06] Updating config file with new values
[2023:12:05 16:23:06] Writing config file to phables.out/config.yaml
[2023:12:05 16:23:06] ------------------
[2023:12:05 16:23:06] | Runtime config |
[2023:12:05 16:23:06] ------------------

alpha: 1.2
compcount: 200
conda_prefix: /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda
configfile: phables.out/config.yaml
covtol: 100
databases: null
dir: /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/test_data
evalue: 1.0e-10
input: mgshot_S7938Nr1.gfa
log: phables.out/phables.log
maxpaths: 10
mgfrac: 0.2
mincov: 10
minlength: 2000
output: phables.out
profile: null
reads: raw.d_changed/
resources:
  jobCPU: 8
  jobMem: 16000
seqidentity: 0.3
snake_args: []
snake_default:
- --rerun-incomplete
- --printshellcmds
- --nolock
- --show-failed-logs
system_config: /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/config/config.yaml
threads: 1
use_conda: true

[2023:12:05 16:23:06] ---------------------
[2023:12:05 16:23:06] | Snakemake command |
[2023:12:05 16:23:06] ---------------------

snakemake -s /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/phables.smk --configfile phables.out/config.yaml --cores 1 --use-conda --conda-prefix /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda --rerun-incomplete --printshellcmds --nolock --show-failed-logs
Restricted license - for non-production use only - expires 2025-11-24
/home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/pulp/apis/gurobi_api.py:170: UserWarning: GUROBI error: Unknown parameter '_test'.
  warnings.warn("GUROBI error: {}.".format(e))
Config file /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/../config/config.yaml is extended by additional config specified via the command line.
Config file /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/../config/databases.yaml is extended by additional config specified via the command line.
Output files will be saved to directory, phables.out

Building DAG of jobs...
Creating conda environment /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/rules/../envs/koverage.yaml...
Downloading and installing remote packages.
CreateCondaEnvironmentException:
Could not create conda environment from /home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/rules/../envs/koverage.yaml:
Command:
mamba env create --quiet --file "/home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda/839a4223db024fdec97df97a7e617d49_.yaml" --prefix "/home/andre/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda/839a4223db024fdec97df97a7e617d49_"
Output:
Could not solve for environment specs
The following package could not be installed
└─ koverage >=0.1.6  is uninstallable because it requires
   └─ datapane >=0.16.7 , which does not exist (perhaps a missing channel).

I'm not sure what to do here - I've already set conda config --set channel_priority strict as well. Any help? Thanks in advance.

Vini2 commented 10 months ago

Hi @GeoMicroSoares,

Thanks for your interest in phables.

Can you please disable the strict channel priority using the following command and try again? This will allow conda to install the newest version of a package.

conda config --set channel_priority disabled

Let me know if the error still exists.

Thanks!

beardymcjohnface commented 10 months ago

I dont think datapane is actually used by koverage when run by phables. @Vini2 I'll open an issue on koverage and see if I can clean up the the base koverage environment a bit. If nothing else it should prevent some future issues like this.

GeoMicroSoares commented 10 months ago

Hi there - this was resolved after adding conda-forge to the YAML of that conda environment! Thanks for the help!