Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda installation- complications #62

Open
JonathanAbrahams1337 opened this issue Mar 5, 2024 · 3 comments
Open

Conda installation- complications #62

JonathanAbrahams1337 opened this issue Mar 5, 2024 · 3 comments

Comments

@JonathanAbrahams1337
Copy link

Hi,

Excited to use modpolish. I am having trouble to install using conda/mamba though.

Installation using the command on the readme mamba create -n homopolish_mamba_auto_0_4_1 -c conda-forge -c bioconda homopolish installs version 0.3.3. This version doesnt have modpolish in.

When trying to specify the latest version 0.4.1 mamba create -n homopolish_mamba_auto_0_4_1 -c conda-forge -c bioconda homopolish==0.4.1 , this fails with the following:

Looking for: ['homopolish==0.4.1']

conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
bioconda/linux-64                                           Using cache
bioconda/noarch                                             Using cache
pkgs/r/noarch                                                 No change
pkgs/main/linux-64                                            No change
pkgs/r/linux-64                                               No change
pkgs/main/noarch                                              No change
Could not solve for environment specs
Encountered problems while solving:
  - package homopolish-0.4.1-pyhdfd78af_0 requires libedit >=3.1.20210910, but none of the providers can be installed

The environment can't be solved, aborting the operation

And also trying to install 0.4 also fails.

@Pohuii-Tzeng
Copy link
Collaborator

Hello,
It seems like you didn't change the channel priority to flexible.
Maybe you can try running conda config --set channel_priority flexible before Installing homopolish.
If there has no "defaults" channel in your conda info, like

channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
               https://repo.anaconda.com/pkgs/main/noarch
               https://repo.anaconda.com/pkgs/r/linux-64
               https://repo.anaconda.com/pkgs/r/noarch

you can try run mamba create -n homopolish_mamba_auto_0_4_1 -c conda-forge -c bioconda -c defaults homopolish==0.4.1 to install homopolish.

@JonathanAbrahams1337
Copy link
Author

Thanks for your fast response.

The mamba command ran succesfully, but I wasnt able to run homopolish uising it.

This is the environment I ended up with after running that mamba command and setting channels to flexbile.

name: homopolish_mamba_auto_0_4_1
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_kmp_llvm
  - arrow-cpp=3.0.0=py37h0161837_4_cpu
  - aws-c-cal=0.4.5=hb3cee0b_7
  - aws-c-common=0.5.1=h7f98852_0
  - aws-c-event-stream=0.2.7=hf6e4101_0
  - aws-c-io=0.9.0=hd4bc808_1
  - aws-checksums=0.1.11=hbd38b91_2
  - aws-sdk-cpp=1.8.138=hfa2f2a4_3
  - biopython=1.79=py37h540881e_2
  - blas=2.17=openblas
  - boost=1.70.0=py37h9de70de_1
  - boost-cpp=1.70.0=h7b93d67_3
  - brotli=1.1.0=hd590300_1
  - brotli-bin=1.1.0=hd590300_1
  - brotli-python=1.0.9=py37hd23a5d3_7
  - brotlipy=0.7.0=py37h540881e_1004
  - bzip2=1.0.8=hd590300_5
  - c-ares=1.27.0=hd590300_0
  - ca-certificates=2024.2.2=hbcca054_0
  - capnproto=1.0.2=hfc55251_0
  - certifi=2024.2.2=pyhd8ed1ab_0
  - cffi=1.15.1=py37h43b0acd_1
  - chardet=5.0.0=py37h89c1867_0
  - charset-normalizer=3.3.2=pyhd8ed1ab_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - cryptography=38.0.2=py37h38fbfac_1
  - curl=7.87.0=h6312ad2_0
  - double-conversion=3.3.0=h59595ed_0
  - fastani=1.32=he1c1bb9_0
  - feather-format=0.4.1=pyh9f0ad1d_0
  - gflags=2.2.2=he1b5a44_1004
  - glog=0.4.0=h49b9bf7_3
  - grpc-cpp=1.35.0=h2157cd5_4
  - gsl=2.4=h294904e_1006
  - homopolish=0.4.1=pyhdfd78af_1
  - icu=67.1=he1b5a44_0
  - idna=3.6=pyhd8ed1ab_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - k8=0.2.5=hdcf5f25_4
  - keyutils=1.6.1=h166bdaf_0
  - krb5=1.20.1=hf9c8cef_0
  - ld_impl_linux-64=2.40=h41732ed_0
  - libabseil=20230802.1=cxx17_h59595ed_0
  - libblas=3.8.0=17_openblas
  - libbrotlicommon=1.1.0=hd590300_1
  - libbrotlidec=1.1.0=hd590300_1
  - libbrotlienc=1.1.0=hd590300_1
  - libcblas=3.8.0=17_openblas
  - libcurl=7.87.0=h6312ad2_0
  - libdeflate=1.13=h166bdaf_0
  - libedit=3.1.20230828=h5eee18b_0
  - libev=4.33=hd590300_2
  - libevent=2.1.10=h9b69904_4
  - libffi=3.4.2=h7f98852_5
  - libgcc-ng=13.2.0=h807b86a_5
  - libgfortran-ng=7.5.0=h14aa051_20
  - libgfortran4=7.5.0=h14aa051_20
  - liblapack=3.8.0=17_openblas
  - liblapacke=3.8.0=17_openblas
  - libnghttp2=1.51.0=hdcd2b5c_0
  - libnsl=2.0.1=hd590300_0
  - libopenblas=0.3.10=pthreads_hb3c22a3_5
  - libprotobuf=3.14.0=h780b84a_0
  - libsqlite=3.45.1=h2797004_0
  - libssh2=1.10.0=haa6b8db_3
  - libstdcxx-ng=13.2.0=h7e041cc_5
  - libthrift=0.13.0=hbe8ec66_6
  - libutf8proc=2.8.0=h166bdaf_0
  - libzlib=1.2.13=hd590300_5
  - llvm-openmp=15.0.7=h0cdce71_0
  - lz4-c=1.9.3=h9c3ff4c_1
  - mash=2.1.1=he518ae8_0
  - minimap2=2.26=he4a0461_2
  - more-itertools=10.0.0=pyhd8ed1ab_0
  - ncbi-datasets-cli=16.6.0=ha770c72_0
  - ncurses=6.4=h59595ed_2
  - numpy=1.18.5=py37h8960a57_0
  - numpy-base=1.18.5=py37h2f8d375_0
  - openssl=1.1.1w=hd590300_0
  - orc=1.6.7=h7950760_0
  - pandas=1.3.5=py37he8f5f7f_0
  - parquet-cpp=1.5.1=2
  - pip=24.0=pyhd8ed1ab_0
  - pyarrow=3.0.0=py37h0ef46b9_4_cpu
  - pycparser=2.21=pyhd8ed1ab_0
  - pycurl=7.45.1=py37haaec8a5_2
  - pyopenssl=23.2.0=pyhd8ed1ab_1
  - pysam=0.21.0=py37hee149a5_0
  - pysocks=1.7.1=py37h89c1867_5
  - python=3.7.12=hb7a2778_100_cpython
  - python-dateutil=2.9.0=pyhd8ed1ab_0
  - python-wget=3.2=py_0
  - python_abi=3.7=4_cp37m
  - pytz=2024.1=pyhd8ed1ab_0
  - re2=2020.11.01=h58526e2_0
  - readline=8.2=h8228510_1
  - requests=2.31.0=pyhd8ed1ab_0
  - s2n=1.0.0=h9b69904_0
  - scikit-learn=0.21.3=py37hcdab131_0
  - scipy=1.5.3=py37h8911b10_0
  - setuptools=59.8.0=py37h89c1867_1
  - six=1.16.0=pyh6c4a22f_0
  - snappy=1.1.10=h9fff704_0
  - sqlite=3.45.1=h2c6b66d_0
  - thrift-compiler=0.13.0=hbe8ec66_6
  - thrift-cpp=0.13.0=6
  - tk=8.6.13=noxft_h4845f30_101
  - tqdm=4.66.2=pyhd8ed1ab_0
  - uriparser=0.9.7=h59595ed_1
  - urllib3=2.2.1=pyhd8ed1ab_0
  - wheel=0.42.0=pyhd8ed1ab_0
  - xz=5.2.6=h166bdaf_0
  - zlib=1.2.13=hd590300_5
  - zstd=1.4.9=ha95c52a_0

I get this error when doing homopolish --help

Traceback (most recent call last):
  File "/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/bin/homopolish", line 6, in <module>
    from homopolish.homopolish import main
  File "/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/lib/python3.7/site-packages/homopolish/homopolish.py", line 4, in <module>
    from modules.polish_interface import polish_genome
  File "/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/lib/python3.7/site-packages/modules/polish_interface.py", line 11, in <module>
    from modules import polish
  File "/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/lib/python3.7/site-packages/modules/polish.py", line 5, in <module>
  File "/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/lib/python3.7/site-packages/more_itertools/__init__.py", line 3, in <module>
    from .more import *  # noqa
  File "/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/lib/python3.7/site-packages/more_itertools/more.py", line 5, in <module>
    from functools import cached_property, partial, reduce, wraps
ImportError: cannot import name 'cached_property' from 'functools' (/home/OXFORDNANOLABS/jabrahams/miniconda3/envs/homopolish_mamba_auto_0_4_1/lib/python3.7/functools.py)

I have managed to get the homopolymer part of the tool running smoothly with a custom environment and a few tweaks to the code, but the modpolish part doesnt work correctly in this env. So would very much appreciate your continued help with this!
homopolish_homopolish_flexi_manual.txt

@Pohuii-Tzeng
Copy link
Collaborator

Pohuii-Tzeng commented Mar 6, 2024

We found the "ImportError" is caused by the "more-itertools" version.

You can try using
mamba create -n homopolish_env -c conda-forge -c bioconda -c defaults more-itertools=8.4.0 homopolish=0.4.1 homopolish==0.4.1
to specify the version of "more-itertools" and recreate the evironment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants