veg / hivtrace

MIT License
22 stars 15 forks source link

hivnetworkcsv #74

Closed lwxing closed 1 year ago

lwxing commented 4 years ago

hivtrace -i ./test/rsrc/TEST.FASTA -a resolve -r HXB2_prrt -t .015 -m 500 -g .05 -c when I use the above command ,it occurs this error.

Traceback (most recent call last): File "/usr/local/bin/hivtrace", line 11, in sys.exit(main()) File "/usr/local/lib/python3.6/dist-packages/hivtrace/hivtrace.py", line 807, in main prior=PRIOR File "/usr/local/lib/python3.6/dist-packages/hivtrace/hivtrace.py", line 692, in hivtrace complete_stderr) subprocess.CalledProcessError: <exception str() failed>

hivtrace.log

DEBUG:root:/usr/bin/python3 hivnetworkcsv -i /tmp/hivtrace-s3ye3pyg/TEST.FASTA_userlanl.tn93output.csv -t .015 -f plain -J -q -k /tmp/hivtrace-s3ye3pyg/TEST.FASTA_user_filter.csv INFO:root:{"type": "status update", "index": 6, "title": "Inferring connections to sequences in a public database", "status": 2, "msg": "/usr/bin/python3: can't open file 'hivnetworkcsv': [Errno 2] No such file or directory\n"}

stevenweaver commented 4 years ago

Dear @lwxing,

Would you mind providing the contents of pip freeze? It looks as though you may be missing the hivclustering dependency.

Best, Steven

lwxing commented 4 years ago

I have installed hivclustering(version 1.6.3)

pip3 freeze

asn1crypto==0.24.0 attrs==20.2.0 bioext==0.19.8 biopython==1.78 certifi==2020.6.20 chardet==3.0.4 cloud-init==19.1.6 command-not-found==0.3 configobj==5.0.6 cryptography==2.1.4 Cython==0.29.21 distro-info===0.18ubuntu0.18.04.1 fakemp==0.9.1 hivclustering==1.6.3 hivtrace==0.6.2 hppy==0.9.9 hyphy-python==0.1.9 idna==2.10 importlib-metadata==1.7.0 Jinja2==2.11.2 joblib==0.17.0 jsonpatch==1.26 jsonpointer==2.0 jsonschema==3.2.0 keyring==10.6.0 keyrings.alt==3.0 language-selector==0.1 MarkupSafe==1.1.1 netifaces==0.10.4 numpy==1.19.2 oauthlib==3.1.0 pycairo==1.16.2 pycrypto==2.6.1 pygobject==3.26.1 pyrsistent==0.17.3 pysam==0.16.0.1 python-apt==1.6.5+ubuntu0.3 pyxdg==0.25 PyYAML==5.3.1 requests==2.24.0 scipy==1.5.3 SecretStorage==2.3.1 six==1.15.0 ssh-import-id==5.7 tornado==6.0.4 ufw==0.36 urllib3==1.25.10 zipp==3.1.0

At 2020-10-29 00:03:41, "Steven Weaver" notifications@github.com wrote:

Dear @lwxing,

Would you mind providing the contents of pip freeze? It looks as though you may be missing the hivclustering dependency.

Best, Steven

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

stevenweaver commented 4 years ago

Dear @lwxing,

This is strange behavior. Can you execute the following command:

python3 -c "import os; import sys; print(os.path.dirname(sys.executable))

You should see something like this:

(env2) 11:12:22 sweaver@MacBook-Pro-2 hivtrace master ? python3 -c "import os; import sys; print(os.path.dirname(sys.executable))"
/Users/sweaver/Programming/hivtrace/env2/bin

Then, try using the following command to see if hivnetworkcsv exists in your python executable environment's bin directory.

ls -lath $(python3 -c "import os; import sys; print(os.path.dirname(sys.executable))")/hivnetworkcsv

Best, Steven

lwxing commented 3 years ago

Dear @stevenweaver, issue: "msg": "/usr/bin/python3: can't open file 'hivnetworkcsv': [Errno 2] No such file or directory\n" I have solved this issue after I created the virtualenv and redownload the requirement package in the virtualenv you are right . hivnetworkcsv didn't exist in my python executable environment's bin directory before I created the virtualenv

However,

it has other problems now. It feels like something is wrong with the JSON format

(hivtrace_env) root@ubuntu:~/hivtrace# hivtrace -i ./test/rsrc/TEST.FASTA -a resolve -r HXB2_prrt -t .015 -m 500 -g .05 -c

Traceback (most recent call last): File "/home/python/.virtualenvs/hivtrace_env/bin/hivtrace", line 8, in sys.exit(main()) File "/home/python/.virtualenvs/hivtrace_env/lib/python3.6/site-packages/hivtrace/hivtrace.py", line 807, in main prior=PRIOR File "/home/python/.virtualenvs/hivtrace_env/lib/python3.6/site-packages/hivtrace/hivtrace.py", line 704, in hivtrace annotate_lanl(LANL_OUTPUT_CLUSTER_JSON, LANL_FASTA) File "/home/python/.virtualenvs/hivtrace_env/lib/python3.6/site-packages/hivtrace/hivtrace.py", line 252, in annotate_lanl node_ids = set([n["id"] for n in nodes]) File "/home/python/.virtualenvs/hivtrace_env/lib/python3.6/site-packages/hivtrace/hivtrace.py", line 252, in node_ids = set([n["id"] for n in nodes]) TypeError: string indices must be integers

Best, lwxing

lwxing commented 3 years ago

Dear @stevenweaver, As for "TypeError: string indices must be integers",I have changed "node_ids = set([n["id"] for n in nodes])" to look like this: node_ids = set(nodes["id"]) Is that right? I don't know if I got the right results.json Would you mind sending me a TEST.FASTA.results.json and a screenshot of the result using the command " hivtrace_viz ./test/rsrc/TEST.FASTA.results.json

Best, lwxing

liamxg commented 11 months ago

same for me. (base) simon@192 test % hivtrace -i TEST.FASTA -a resolve -r HXB2_prrt -t .015 -m 500 -g .05 -c

Traceback (most recent call last): File "/Users/simon/opt/miniconda3/bin/hivtrace", line 8, in sys.exit(main()) File "/Users/simon/opt/miniconda3/lib/python3.9/site-packages/hivtrace/hivtrace.py", line 793, in main results = hivtrace( File "/Users/simon/opt/miniconda3/lib/python3.9/site-packages/hivtrace/hivtrace.py", line 704, in hivtrace annotate_lanl(LANL_OUTPUT_CLUSTER_JSON, LANL_FASTA) File "/Users/simon/opt/miniconda3/lib/python3.9/site-packages/hivtrace/hivtrace.py", line 252, in annotate_lanl node_ids = set([n["id"] for n in nodes]) File "/Users/simon/opt/miniconda3/lib/python3.9/site-packages/hivtrace/hivtrace.py", line 252, in node_ids = set([n["id"] for n in nodes]) TypeError: string indices must be integers