Vini2 / phables

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

Error when copying system default config using phables install #29

Closed kalonji08 closed 3 months ago

kalonji08 commented 9 months ago

Describe the bug: I encountered a TypeError when trying to run phables install.

To Reproduce: Steps to reproduce the behavior:

  1. Activate the phables conda environment.
  2. Run phables install.
  3. See error.

Expected behavior: The tool should install without any errors.

Error log: phables install [2023:09:26 08:52:43] Copying system default config to phables.out/config.yaml Traceback (most recent call last): File "/home/kalonjilab/miniconda3/envs/phables/bin/phables", line 10, in sys.exit(main()) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/phables/main.py", line 343, in main cli() File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(args, **kwargs) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/phables/main.py", line 290, in install run_snakemake( File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/snaketool_utils/cli_utils.py", line 216, in run_snakemake copy_config(configfile, system_config=system_config, log=log) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/snaketool_utils/cli_utils.py", line 170, in copy_config copyfile(system_config, local_config) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/shutil.py", line 233, in copyfile if _samefile(src, dst): File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/shutil.py", line 210, in _samefile return os.path.samefile(src, dst) File "/home/kalonjilab/miniconda3/envs/phables/lib/python3.10/genericpath.py", line 100, in samefile s1 = os.stat(f1) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Vini2 commented 9 months ago

Hi @kalonji08,

I will check this error and get back to you ASAP

Thanks!

ilnamkang commented 9 months ago

Hi,

I've been experiencing the same error.

My temporary solution is to copy the config file manually into the "phables.out" directory.

cp -p <path-to>/miniconda3/envs/phables/lib/python3.10/site-packages/phables/config/config.yaml ./phables.out

Then, rerun

phables install
beardymcjohnface commented 9 months ago

Blame me for this, but it should be fixed in the next version!

Vini2 commented 9 months ago

Hi @kalonji08,

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!

kalonji08 commented 8 months ago

Hi @Vini2 Thanks! i managed to install but i'm getting this error: -- CMAKE_C_FLAGS: -Wall -fno-semantic-interposition -msse4.2 -fdiagnostics-color=always -fno-omit-frame-pointer -Wno-unused-variable -Wno-maybe-uninitialized -- CMAKE_CXX_FLAGS: -Wno-noexcept-type -Wall -fno-semantic-interposition -msse4.2 -fdiagnostics-color=always -fno-omit-frame-pointer -Wno-unused-variable -Wno-maybe-uninitialized -- Generator: Unix Makefiles -- Build output directory: /tmp/pip-install-f094xsj1/pyarrow_fde13307094141448994824eba2b1ef4/build/temp.linux-x86_64-cpython-312/release CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find Python3 (missing: Development NumPy) (found version "3.12.0") Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.16/Modules/FindPython/Support.cmake:2214 (find_package_handle_standard_args) /usr/share/cmake-3.16/Modules/FindPython3.cmake:300 (include) cmake_modules/FindPython3Alt.cmake:48 (find_package) CMakeLists.txt:255 (find_package)

  -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-f094xsj1/pyarrow_fde13307094141448994824eba2b1ef4/build/temp.linux-x86_64-cpython-312/CMakeFiles/CMakeOutput.log".
  error: command '/bin/cmake' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyarrow ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects

failed

CondaEnvException: Pip failed

here is the log txt:

[2023:10:25 22:16:04] Copying system default config to HC3-phout/config.yaml [2023:10:25 22:16:04] Updating config file with new values [2023:10:25 22:16:04] Writing config file to HC3-phout/config.yaml [2023:10:25 22:16:04] ------------------ [2023:10:25 22:16:04] | Runtime config | [2023:10:25 22:16:04] ------------------

alpha: 1.2 compcount: 200 covtol: 100 databases: null evalue: 1.0e-10 input: HC3-assembly_graph_with_scaffolds.gfa log: HC3-phout/phables.log maxpaths: 10 mgfrac: 0.2 mincov: 10 minlength: 2000 output: HC3-phout profile: null reads: /media/external/ResultsDataPhD/HC3/fastq resources: jobCPU: 8 jobMem: 16000 seqidentity: 0.3

[2023:10:25 22:16:04] --------------------- [2023:10:25 22:16:04] | Snakemake command | [2023:10:25 22:16:04] ---------------------

snakemake -s /home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/phables/workflow/phables.smk --configfile HC3-phout/config.yaml --cores 28 --use-conda --conda-prefix /home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/phables/workflow/conda --rerun-incomplete --printshellcmds --nolock --show-failed-logs [2023:10:25 22:17:03] ERROR: Snakemake failed

Here is the code:

phables run --input HC3-assembly_graph_with_scaffolds.gfa --reads /media/external/ResultsDataPhD/HC3/fastq --threads 28 --output HC3-phout

Vini2 commented 8 months ago

Hi @kalonji08,

Can you check and tell the Python and pip versions in the phables environment using the following commands? pip --version python --version

kalonji08 commented 8 months ago

Hi @Vini2 Thanks for getting back to me, here it is: pip 23.2.1 from /home/kalonjilab/miniconda3/envs/phables/lib/python3.10/site-packages/pip (python 3.10 Python 3.10.12