johnnytam100 / AlphaCutter

This repository contains the AlphaCutter.py for the removal of non-globular regions from predicted protein structures.
https://doi.org/10.1002/pmic.202300176
MIT License
14 stars 4 forks source link

Environment conflict #2

Closed DimaMolod closed 1 year ago

DimaMolod commented 1 year ago

Hi, and thanks for this nice software! I tried to install the conda env from the environment.yml both on MacOS Ventura 13.5 and CentOS 8.7 and got the following errors: On Mac:

(base) ~/PycharmProjects/AlphaCutter$ conda env create -f environment.yml
Retrieving notices: ...working... done
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - ca-certificates==2023.01.10=h06a4308_0
  - python==3.8.16=h7a1cb2a_3
  - libstdcxx-ng==11.2.0=h1234567_1
  - lz4-c==1.9.4=h6a678d5_0
  - setuptools==66.0.0=py38h06a4308_0
  - libffi==3.4.2=h6a678d5_6
  - ld_impl_linux-64==2.38=h1181459_1
  - xz==5.4.2=h5eee18b_0
  - libgcc-ng==11.2.0=h1234567_1
  - bzip2==1.0.8=h7b6447c_0
  - dssp==3.0.0=h3fd9d12_4
  - libgomp==11.2.0=h1234567_1
  - wheel==0.38.4=py38h06a4308_0
  - zstd==1.5.5=hc292b87_0
  - libboost==1.73.0=h28710b8_12
  - zlib==1.2.13=h5eee18b_0
  - readline==8.2=h5eee18b_0
  - ncurses==6.4=h6a678d5_0
  - openssl==1.1.1t=h7f8727e_0
  - tk==8.6.12=h1ccaba5_0
  - _openmp_mutex==5.1=1_gnu
  - icu==58.2=he6710b0_3
  - sqlite==3.41.2=h5eee18b_0
  - pip==23.0.1=py38h06a4308_0

On Linux:

(base) [dmolodenskiy@login01 AlphaCutter]$ conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: done

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: / Ran pip subprocess with arguments:
['/home/dmolodenskiy/.conda/envs/AlphaCutter/bin/python', '-m', 'pip', 'install', '-U', '-r', '/g/kosinski/dima/PycharmProjects/AlphaCutter/condaenv.sxo5uwi0.requirements.txt']
Pip subprocess output:
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Collecting biopandas==0.4.1
  Downloading biopandas-0.4.1-py2.py3-none-any.whl (878 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 879.0/879.0 kB 32.6 MB/s eta 0:00:00
Collecting biopython==1.81
  Downloading biopython-1.81-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 123.1 MB/s eta 0:00:00
Collecting ccmap==2.1.3
  Downloading ccmap-2.1.3.tar.gz (35 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting docopt==0.6.2
  Downloading docopt-0.6.2.tar.gz (25 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting networkx==3.1
  Downloading networkx-3.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 87.4 MB/s eta 0:00:00
Collecting numpy==1.24.3
  Downloading numpy-1.24.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.3/17.3 MB 149.2 MB/s eta 0:00:00
Collecting pandas==2.0.1
  Downloading pandas-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 157.2 MB/s eta 0:00:00
Collecting pcmap==0.5.0
  Downloading pcmap-0.5.0-py3-none-any.whl (23 kB)
Collecting pypstruct==0.1.2
  Downloading pypstruct-0.1.2-py3-none-any.whl (23 kB)
Collecting python-dateutil==2.8.2
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 217.7 MB/s eta 0:00:00
Collecting pytz==2023.3
  Downloading pytz-2023.3-py2.py3-none-any.whl (502 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 502.3/502.3 kB 231.6 MB/s eta 0:00:00
Collecting scipy==1.8.0
  Downloading scipy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.6/41.6 MB 12.2 MB/s eta 0:00:00
Collecting six==1.16.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting tzdata==2023.3
  Downloading tzdata-2023.3-py2.py3-none-any.whl (341 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 341.8/341.8 kB 217.8 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /g/kosinski/dima/.conda/envs/AlphaCutter/lib/python3.8/site-packages (from biopandas==0.4.1->-r /g/kosinski/dima/PycharmProjects/AlphaCutter/condaenv.sxo5uwi0.requirements.txt (line 1)) (66.0.0)
Building wheels for collected packages: ccmap, docopt
  Building wheel for ccmap (setup.py): started
  Building wheel for ccmap (setup.py): finished with status 'error'
  Running setup.py clean for ccmap
  Building wheel for docopt (setup.py): started
  Building wheel for docopt (setup.py): finished with status 'done'
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13705 sha256=59341f44613665213af3310295170ef1c16fac06f82952fba725dc70880afd95
  Stored in directory: /tmp/pip-ephem-wheel-cache-ocfiyg9r/wheels/56/ea/58/ead137b087d9e326852a851351d1debf4ada529b6ac0ec4e8c
Successfully built docopt
Failed to build ccmap
Installing collected packages: pytz, docopt, ccmap, tzdata, six, numpy, networkx, scipy, python-dateutil, pypstruct, biopython, pcmap, pandas, biopandas
  Running setup.py install for ccmap: started
  Running setup.py install for ccmap: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'ccmap' extension
      creating build
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/ccmap
      creating build/temp.linux-x86_64-cpython-38/ccmap/src
      gcc -pthread -B /home/dmolodenskiy/.conda/envs/AlphaCutter/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iccmap/include -I/home/dmolodenskiy/.conda/envs/AlphaCutter/include/python3.8 -c ccmap/ccmapmodule.c -o build/temp.linux-x86_64-cpython-38/ccmap/ccmapmodule.o -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D AS_PYTHON_EXTENSION -std=c99 -pedantic
      as: unrecognized option '--gdwarf-5'
      error: command '/g/easybuild/x86_64/Rocky/8/haswell/software/GCCcore/12.2.0/bin/gcc' 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 ccmap
  error: subprocess-exited-with-error

  × Running setup.py install for ccmap did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running install
      /home/dmolodenskiy/.conda/envs/AlphaCutter/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      building 'ccmap' extension
      creating build
      creating build/temp.linux-x86_64-cpython-38
      creating build/temp.linux-x86_64-cpython-38/ccmap
      creating build/temp.linux-x86_64-cpython-38/ccmap/src
      gcc -pthread -B /home/dmolodenskiy/.conda/envs/AlphaCutter/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Iccmap/include -I/home/dmolodenskiy/.conda/envs/AlphaCutter/include/python3.8 -c ccmap/ccmapmodule.c -o build/temp.linux-x86_64-cpython-38/ccmap/ccmapmodule.o -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D AS_PYTHON_EXTENSION -std=c99 -pedantic
      as: unrecognized option '--gdwarf-5'
      error: command '/g/easybuild/x86_64/Rocky/8/haswell/software/GCCcore/12.2.0/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> ccmap

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

failed

CondaEnvException: Pip failed

Seems like ccmap is causing a problem? Could you recommend how I should properly install the conda environment? Thank you!

Best, Dima

johnnytam100 commented 1 year ago

Hi Dima, unfortunately I don't own a mac.. Would you mind trying to use it on other linux systems? Alternatively, I can help you cut your structures if there are not many.

johnnytam100 commented 1 year ago

Alternatively, you can really just try to run AlphaCutter in the base environment. AlphaCutter only uses these packages:

import numpy as np
import pandas as pd
from biopandas.pdb import PandasPdb
from argparse import ArgumentParser
import glob
from Bio.PDB import PDBParser
from Bio.PDB.DSSP import DSSP
from scipy import stats
import pcmap
import itertools
import networkx as nx
import re
import os

Then, install each package whenever python says not found. For pcmap, you can install according to their repo: https://github.com/MMSB-MOBI/pcmap

DimaMolod commented 1 year ago

Thank you, Johnny, you are right and the problem originated from pcmap installation. I opened an issue there, and hope they fix the problem. I consider integrating AlphaCutter into our pipeline so once I'll do a few tests I will get back to you :)