Open ntromas opened 7 months ago
Dear SOCfinder team,
I got the same exact error as Nico did (above) when I tried to run SOCfinder with the test files. The error I see looks like this:
Traceback (most recent call last):
File "/Users/thl783/SOCfinder/./SOC_parse.py", line 221, in
I would really like to use this tool but have been stuck on this error for some time now.
Best, Dana
Sorry for the delayed response
I think this is something to do with the antismash installation
To work out what is wrong, we need to run an antismash command manually
I would suggest; 1) Open the SOC_mine.py script and comment-out line 244 subprocess.run(['rm', script_filename]) 2) try the SOC_mine line again. It will still fail, but you will now have a script file names SOCfinder.sh 3) open that script file, and find the antismash command 4) try running just that command
You should then get a more informative error about why antismash isn't working
It might be the version of diamond that is incompatible
You could try fixing with
install -c bioconda diamond=0.9.14
Thank you for those suggestions. I made sure that my version of diamond is correct. I also did what you suggested above and got this output in the SOCfinder.sh file.
#!/bin/bash
### if you need to add exec_annotation to path, do it here ##
mkdir B_aphidicola/blast_outputs
exec_annotation test/B_aphidicola.faa -o B_aphidicola/kofam.txt -f detail-tsv --threshold-scale 0.75 --tmp-dir=B_aphidicola/tmp --cpu=32 -p /Users/thl783/SOCfinder/KOFAM/profiles/prokaryote.hal -k /Users/thl783/SOCfinder/KOFAM/ko_list &
### blast to gram
blastp -db blast_databases/blastdbN -query test/B_aphidicola.faa -evalue 10e-8 -outfmt "6 sseqid qacc qlen evalue bitscore sstart send slen" -out B_aphidicola/blast_outputs/file_PSORT.txt -num_threads 16 &
##### blast to proven extracellular
blastp -db blast_databases/blastdbCExtra -query test/B_aphidicola.faa -evalue 10e-8 -outfmt "6 sseqid qacc qlen evalue bitscore sstart send slen" -out B_aphidicola/blast_outputs/file_PSORT_E.txt -num_threads 16 &
###### blast to proven non-extracellular
blastp -db blast_databases/blastdbCNonExtra -query test/B_aphidicola.faa -evalue 10e-8 -outfmt "6 sseqid qacc qlen evalue bitscore sstart send slen" -out B_aphidicola/blast_outputs/file_PSORT_NE.txt -num_threads 16 &
antismash test/B_aphidicola.fna --genefinding-gff3 test/B_aphidicola_1.gff --output-dir B_aphidicola/anti_smash
### save the accession number
file=test/B_aphidicola.fna
first_line=$(head -n 1 "$file")
acc=$(echo "$first_line" | cut -d' ' -f1)
acc1=$(echo "$acc" | cut -c2- )
echo $acc1 > B_aphidicola/anti_smash/accession.txt
I would really appreciate any suggestions you have on fixing this issue.
Best, Dana
Try running just the antismash line
antismash test/B_aphidicola.fna --genefinding-gff3 test/B_aphidicola_1.gff --output-dir B_aphidicola/anti_smash
And see what error message you get
I am not sure why but I am getting this:
zsh: command not found: antismash
I followed all the directions in the tutorial and added the necessary lines to my .bash_profile.
And when I try to install antiSMASH in the SOCfinder environment, I am getting the error below.
Solving environment: | warning libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed
LibMambaUnsatisfiableError: Encountered problems while solving:
- cannot install both pin-1-1 and pin-1-1
- package kofamscan-1.3.0-hdfd78af_2 requires hmmer >=3.1,<3.3.1|>=3.3.2, but none of the providers can be installed
Could not solve for environment specs
The following packages are incompatible
├─ antismash is installable with the potential options
│ ├─ antismash [5.1.1|5.1.2|...|6.1.1] would require
│ │ └─ hmmer 3.1b2 , which can be installed;
│ └─ antismash [4.0.1|4.0.2|4.1.0|4.2.0] would require
│ └─ ete2, which requires
│ └─ pyqt [4.* |>=4.11.4,<4.12.0a0 ], which requires
│ └─ qt 4.8.* , which does not exist (perhaps a missing channel);
├─ kofamscan is not installable because there are no viable options
│ ├─ kofamscan 1.3.0 would require
│ │ └─ hmmer >=3.1,<3.3.1|>=3.3.2 , which conflicts with any installable versions previously reported;
│ └─ kofamscan [1.0.0|1.1.0|1.2.0|1.3.0] would require
│ └─ hmmer >=3.1 , which conflicts with any installable versions previously reported;
└─ pin-1 is installable with the potential options
├─ pin-1 1, which can be installed;
└─ pin-1 1 conflicts with any installable versions previously reported.
Pins seem to be involved in the conflict. Currently pinned specs:
- python 3.12.* (labeled as 'pin-1')
Hmm ok. Something to maybe try;
1) make a new conda environment with python version 3.10.11 conda create -n "soc_test" python=3.10.11 conda activate soc_test 2) navigate to your ANTISMASH folder 3) try antismash installation again pip install ./antismash-7.0.0 python antismash-7.0.0/antismash/download_databases.py 4) then try and antismash command
When I tried to create a new conda environment with the python version 3.10.11 I get a similar error:
LibMambaUnsatisfiableError: Encountered problems while solving:
- nothing provides tzdata needed by python-3.10.11-h218abb5_2
Could not solve for environment specs
The following package could not be installed
└─ python 3.10.11** is not installable because it requires
└─ tzdata, which does not exist (perhaps a missing channel).
I also tried just installing antismash with pip and got this error:
Processing ./antismash-7.0.0
Preparing metadata (setup.py) ... done
Collecting brawn<1.1,>=1.0 (from antismash==7.0.0)
Using cached brawn-1.0.1-py3-none-any.whl.metadata (4.6 kB)
Collecting numpy<1.25,>=1.23 (from antismash==7.0.0)
Using cached numpy-1.24.4.tar.gz (10.9 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/Users/thl783/opt/anaconda3/envs/SOCfinder/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/thl783/opt/anaconda3/envs/SOCfinder/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/thl783/opt/anaconda3/envs/SOCfinder/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "/Users/thl783/opt/anaconda3/envs/SOCfinder/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/thl783/opt/anaconda3/envs/SOCfinder/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1304, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 994, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/private/var/folders/f8/3_d3xm4s4t7g960pxhgzt1th0000gp/T/pip-build-env-yxhskuxc/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/private/var/folders/f8/3_d3xm4s4t7g960pxhgzt1th0000gp/T/pip-build-env-yxhskuxc/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/private/var/folders/f8/3_d3xm4s4t7g960pxhgzt1th0000gp/T/pip-build-env-yxhskuxc/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Can you show me the output of conda info
, and also what operating system / mac processor you have (e.g. is it an M1 or M2 mac)
Below is my output for conda info. And my mac prosessor is Apple M1; but I followed the instructions in the tutorial and used the following two commands :conda config --add subdirs osx-64
and conda install -c bioconda diamond=0.9.14.
active environment : SOCfinder
active env location : /Users/thl783/opt/anaconda3/envs/SOCfinder
shell level : 2
user config file : /Users/thl783/.condarc
populated config files : /Users/thl783/.condarc
conda version : 23.10.0
conda-build version : 3.27.0
python version : 3.8.18.final.0
virtual packages : __archspec=1=m1
__osx=10.16=0
__unix=0=0
base environment : /Users/thl783/opt/anaconda3 (writable)
conda av data dir : /Users/thl783/opt/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/r/osx-64
package cache : /Users/thl783/opt/anaconda3/pkgs
/Users/thl783/.conda/pkgs
envs directories : /Users/thl783/opt/anaconda3/envs
/Users/thl783/.conda/envs
platform : osx-64
user-agent : conda/23.10.0 requests/2.31.0 CPython/3.8.18 Darwin/23.1.0 OSX/10.16 solver/libmamba conda-libmamba-solver/23.11.0 libmambapy/1.5.3 aau/0.4.3 c/vGP0B1iBMO23-_0D69ugHA s/7Bebsl-xbybKva-3AAfU2g e/dxgXTgrHf0D4W5iVrHTL8w
UID:GID : 502:20
netrc file : None
offline mode : False
Also, I deleted the ANTISMASH folder and ran the helper_script again to see if that would help, and I got this error:
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Traceback (most recent call last):
File "/Users/thl783/SOCfinder/ANTISMASH/antismash-7.0.0/antismash/download_databases.py", line 19, in <module>
import antismash
ModuleNotFoundError: No module named 'antismash'
#################################################
I managed to solve the issue - I needed to have Python version 3.9.0. The earlier version was preventing me from properly installing antiSMASH.
Thanks for your help
Dear SOCFinder team,
First of all, thanks for such nice pipeline! I would love trying this pipeline on multiple genomes to compare their cooperative genes (multiple genomes within the same genus). When I gave a try with one genome - using Prokka output - I got this error.
python /home/nico/programmes/SOCfinder/SOC_mine.py -g faa_files/Microcystis269.faa -f Microcystis269.fa -gff Prokka_Microcystis269/Microcystis269.fa.gff -O Microcystis269_SOC -n FINDING SOCKS .... Traceback (most recent call last): File "/home/nico/programmes/SOCfinder/SOC_mine.py", line 100, in
seqid, source, featuretype, start, end, score, strand, frame, attributes = fields
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 9, got 1)
When I ran on the test files, it went well for the 1st part but I got this error for the second script: (1st script) python /home/nico/programmes/SOCfinder/SOC_mine.py -g test/B_aphidicola.faa -f test/B_aphidicola.fna -gff test/B_aphidicola.gff -O B_aphidicola -n FINDING SOCKS .... No GFF records removed Running SOCfinder modules...... Why not grab a coffee? SOCfinder complete. Check the files in B_aphidicola
(2nd script) (SOCfinder) nico@Barbara:~/programmes/SOCfinder$ ./SOC_parse.py -i B_aphidicola/ -k inputs/SOCIAL_KO.csv -a inputs/antismash_types.csv Traceback (most recent call last): File "/home/nico/programmes/SOCfinder/./SOC_parse.py", line 221, in
os.chdir(base_dir)
FileNotFoundError: [Errno 2] No such file or directory: 'B_aphidicola/anti_smash'
I probably did something wrong, and would be happy to give another try on this!
Thanks for the help,
Nico