mehrdadbakhtiari / adVNTR

A tool for genotyping Variable Number Tandem Repeats (VNTR) from sequence data
http://advntr.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
41 stars 15 forks source link

Error running advntr --help #68

Open aravindpad opened 10 months ago

aravindpad commented 10 months ago

Hi, I was trying to setup advntr using conda and running into to this error. Any help is appreciated. Thank you

(/home/aravind/advntrenv) aravind@cn61:~$ advntr --help Traceback (most recent call last): File "/home/aravind/advntrenv/bin/advntr", line 7, in from advntr.main import main File "/home/aravind/advntrenv/lib/python2.7/site-packages/advntr/main.py", line 6, in from advntr.advntr_commands import genotype, view_model, add_model, del_model File "/home/aravind/advntrenv/lib/python2.7/site-packages/advntr/advntr_commands.py", line 7, in from advntr.genome_analyzer import GenomeAnalyzer File "/home/aravind/advntrenv/lib/python2.7/site-packages/advntr/genome_analyzer.py", line 8, in from advntr.vntr_finder import VNTRFinder File "/home/aravind/advntrenv/lib/python2.7/site-packages/advntr/vntr_finder.py", line 14, in from advntr.hmm_utils import File "/home/aravind/advntrenv/lib/python2.7/site-packages/advntr/hmm_utils.py", line 3, in from pomegranate import DiscreteDistribution, State File "/home/aravind/advntrenv/lib/python2.7/site-packages/pomegranate/init.py", line 38, in from .hmm import File "pomegranate/hmm.pyx", line 13, in init pomegranate.hmm File "/home/aravind/advntrenv/lib/python2.7/site-packages/networkx/init.py", line 68, in import networkx.utils File "/home/aravind/advntrenv/lib/python2.7/site-packages/networkx/utils/init.py", line 2, in from networkx.utils.decorators import * File "/home/aravind/advntrenv/lib/python2.7/site-packages/networkx/utils/decorators.py", line 7, in from decorator import decorator File "/home/aravind/advntrenv/lib/python2.7/site-packages/decorator.py", line 162 print('Error in generated code:', file=sys.stderr) ^ SyntaxError: invalid syntax

aravindpad commented 10 months ago

Hi, Any help would be much appreciated. Thanks

Jong-hun-Park commented 10 months ago

Hi, what is the current version you installed? Did you install adVNTR through conda?

aravindpad commented 10 months ago

Hi, Thank you for replying. I am using Conda and the adVNTR version is 1.5.0 (I installed it on the day I opened the issue). I have another user with the same issue (using Conda). Do we need to try source? Thanks

Jong-hun-Park commented 10 months ago

What version of python do you use? If you are using python 2.7 for adVNTR-1.5.0, can you try python 3.6?

aravindpad commented 10 months ago

Hi, Thank you and apologies on the delayed response. With Python 3.6 I'm getting

(/xxx/aravind/advntrenv) aravind@cn:/xxx/aravind/advntrenv$ conda install -c conda-forge -c bioconda advntr Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): \ Killed (/xxx/aravind/advntrenv) aravind@cn:/xxxx/aravind/advntrenv$ Do you have any other repodata? Thank you

xbwdk commented 10 months ago

Hey @Jong-hun-Park and @aravindpad I am facing a similar issue as @aravindpad. I created a new conda env for advntr and conda automatically configured python 3.6 for advntr 1.3.3. i couldn't run advntr --help either and the error message is

Traceback (most recent call last): File "/myhomedir/miniforge3/envs/advntr_env/bin/advntr", line 7, in from advntr.main import main

File "/myhomedir/miniforge3/envs/advntr_env/lib/python3.6/site-packages/advntr/main.py", line 6, in from advntr.advntr_commands import genotype, view_model, add_model, del_model

File "/myhomedir/miniforge3/envs/advntr_env/lib/python3.6/site-packages/advntr/advntr_commands.py", line 7, in from advntr.genome_analyzer import GenomeAnalyzer

File "/myhomedir/miniforge3/envs/advntr_env/lib/python3.6/site-packages/advntr/genome_analyzer.py", line 8, in from advntr.vntr_finder import VNTRFinder

File "/myhomedir/miniforge3/envs/advntr_env/lib/python3.6/site-packages/advntr/vntr_finder.py", line 14, in from advntr.hmm_utils import *

File "/myhomedir/miniforge3/envs/advntr_env/lib/python3.6/site-packages/advntr/hmm_utils.py", line 3, in from pomegranate import DiscreteDistribution, State

File "/myhomedir/miniforge3/envs/advntr_env/lib/python3.6/site-packages/pomegranate/init.py", line 38, in from .hmm import *

File "pomegranate/hmm.pyx", line 13, in init pomegranate.hmm

File "/myhomedir/.local/lib/python3.6/site-packages/networkx-3.2.1-py3.6.egg/networkx/init.py", line 20, in from networkx.utils.backends import _dispatch

File "/myhomedir/.local/lib/python3.6/site-packages/networkx-3.2.1-py3.6.egg/networkx/utils/backends.py", line 334 self.optional_graphs.add(val := k[:-1]) or val ^

I found ":=" seems like a command after python 3.8, but I couldn't install advntr in any conda env with python 3.8

I also got error messages if i force conda to install advntr 1.5, which led to failure of installation.

Solving environment: failed LibMambaUnsatisfiableError: Encountered problems while solving:

  • nothing provides tensorflow-estimator >=1.13.0,<1.14.0rc0 needed by tensorflow-1.13.1-py27_0 Could not solve for environment specs The following package could not be installed └─ advntr 1.5 is not installable because it requires └─ tensorflow 1.13.1.* but there are no viable options ├─ tensorflow 1.13.1 would require │ ├─ tensorflow-base [1.13.1 py27h76b4ce7_8|1.13.1 py36h58012e3_6|1.13.1 py36h76b4ce7_7|1.13.1 py37h5ece82f_4|1.13.1 py37h5ece82f_5], which requires │ │ └─ tensorflow-estimator >=1.13.0,<1.14.0a0 , which does not exist (perhaps a missing channel); │ └─ tensorflow-estimator >=1.13.0,<1.14.0a0 , which does not exist (perhaps a missing channel); └─ tensorflow 1.13.1 would require └─ tensorflow-estimator >=1.13.0,<1.14.0rc0 , which does not exist (perhaps a missing channel).

May i have your help, please? Thanks a lot!

aravindpad commented 10 months ago

Hi again, With Python 3.5 I'm getting. Is there any way to get around this or installing form source is the only way. Thanks

@xbwdk , I got the same issue with 3.8, that's why i tried 3.5. Got it installed but getting run-time issues. Thanks

ravind@cn105:~$ advntr --help Traceback (most recent call last): File "/xxx/yy/advntrenv/bin/advntr", line 7, in from advntr.main import main File "/xxx/yy/advntrenv/lib/python3.5/site-packages/advntr/main.py", line 6, in from advntr.advntr_commands import genotype, view_model, add_model, del_model File "/xxx/yy/advntrenv/lib/python3.5/site-packages/advntr/advntr_commands.py", line 7, in from advntr.genome_analyzer import GenomeAnalyzer File "/xxx/yy/advntrenv/lib/python3.5/site-packages/advntr/genome_analyzer.py", line 7, in from advntr.sam_utils import extract_unmapped_reads_to_fasta_file File "/xxx/yy/advntrenv/lib/python3.5/site-packages/advntr/sam_utils.py", line 1, in import pysam File "/xxx/yy/advntrenv/lib/python3.5/site-packages/pysam/init.py", line 5, in from pysam.libchtslib import * ImportError: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Jong-hun-Park commented 9 months ago

Can you please try the following?

git clone https://github.com/mehrdadbakhtiari/adVNTR
cd adVNTR
make; make install
python setup.py install
aravindpad commented 9 months ago

@Jong-hun-Park Will try and update here. Thank you

xbwdk commented 9 months ago

Hi @Jong-hun-Park,

I have tried to install advntr1.5 from source using python 2.7, python 3.6 and python 3.9. I installed all the dependencies from either conda or pip, but unfortunately, I still couldn't run advntr after installation....

For python 3.6, after installed, I made it running on the example data for the beginning, but cannot do the genotyping and leave an error message similar to https://github.com/mehrdadbakhtiari/adVNTR/issues/51

For python 2.7, the error message when i run "advntr --help" is

File "myhomedir/miniforge3/envs/advntr2/lib/python2.7/site-packages/keras/distribute/sidecar_evaluator.py", line 195 f"{_CHECKPOINT_TIMEOUT_SEC} seconds. " ^ SyntaxError: invalid syntax

For python 3.9, the error message when i run "advntr --help" is

File "myhomedir/miniforge3/envs/advntr3/lib/python3.9/site-packages/networkx/algorithms/dag.py", line 2, in from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (myhomedir/miniforge3/envs/advntr3/lib/python3.9/fractions.py)

may i check if you can install from source please? @aravindpad

Thanks

Jong-hun-Park commented 9 months ago

Can you please try installing muscle first?

conda install muscle=3.8.1551

And, then try again with python 3.6

aravindpad commented 6 months ago

@Jong-hun-Park Thank you and sorry for a delayed reply. Still having the same trouble Downloading and Extracting Packages muscle-3.8.1551 | 262 KB | ################################################################################################################################################################################################################################################################################################################################################################################################################### | 100% Preparing transaction: done Verifying transaction: done Executing transaction: done Retrieving notices: ...working... done (/home/aravind/advntrenv1) aravind@162:~$ conda install -c conda-forge -c bioconda advntr Collecting package metadata (current_repodata.json): / WARNING conda.models.version:get_matcher(542): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1 done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): - Killed Thanks

xbwdk commented 6 months ago

Hi @aravindpad, I successfully installed muscle but still failed the subsequent steps. Some time later I figured out the reason, not sure if that's the case on your side. Basically, I used miniforge3 with conda-forge + bioconda channel on my machine, but one of the advntr dependencies "Tensorflow 1.13.1" is currently only available to the anaconda channel. I'm not sure if I understand correctly but seems like it's the best explanation for my case.

aravindpad commented 6 months ago

@xbwdk Thank you. I just tried to install tensorflow and it went well as I'm using anaconda. However, advntr still fails.

conda list | grep -i tensor tensorboard 1.13.1 py36hf484d3e_0 tensorflow 1.13.1 mkl_py36h27d456a_0 tensorflow-base 1.13.1 mkl_py36h7ce6ba3_0 tensorflow-estimator 1.13.0 py_0 (/home/aravind/advntrenv1) aravind@105:~$

It's failing at this point

conda install -c conda-forge -c bioconda advntr Collecting package metadata (current_repodata.json): \ WARNING conda.models.version:get_matcher(542): Using . with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1., but conda is ignoring the .* and treating it as 1.7.1 done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): / Killed

Thank you