pyani listdeps broken :: pyani/aniblastall.py :: blastall doe not have --version option
See original GitHub issueSummary:
running pyany listdeps
from fresh cloned repo (commit 0081885c0c5c81e6885a533279c56749c5c12bd4)
I have the following error
Installed third-party tool versions...
blast+==Linux_2.10.0+
nucmer==Linux_3.1
Traceback (most recent call last):
File "/opt/gensoft/exe/pyani/0.3.0a0/bin/pyani", line 8, in <module>
sys.exit(run_main())
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/scripts/pyani_script.py", line 105, in run_main
returnval = args.func(args)
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/scripts/subcommands/subcmd_listdeps.py", line 86, in subcmd_listdeps
for tool, version in get_tool_versions():
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/dependencies.py", line 117, in get_tool_versions
yield (name, func())
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/aniblastall.py", line 74, in get_version
version = re.search( # type: ignore
AttributeError: 'NoneType' object has no attribute 'group'
pyani Version:
pyani does not provide a way to know his version 😉
a --version
flag will be nice.
anyway
average_nucleotide_identity.py --version
average_nucleotide_identity.py: pyani 0.3.0-alpha
code clone from commit 0081885c0c5c81e6885a533279c56749c5c12bd4
installed dependencies
If you are running a version of pyani
v0.3 or later, then please run the command pyani listdeps
at the command line, and enter the output below.
see above problem 😉
System information
Platorm==Linux-4.18.0-193.19.1.el8_2.x86_64-x86_64-with-glibc2.2.5
Python==3.8.1 (default, May 22 2020, 14:09:57)
[GCC 9.2.0]
Installed pyani Python dependendencies...
Pillow==8.1.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
biopython==1.78 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
matplotlib==3.3.3 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
namedlist==1.8 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
networkx==2.5 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
numpy==1.19.5 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
openpyxl==Not Installed (-)
pandas==1.2.1 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
scipy==1.6.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
seaborn==0.11.1 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
sqlalchemy==1.3.22 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
tqdm==4.56.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
Installed pyani development dependendencies...
bandit==Not Installed (-)
black==Not Installed (-)
coverage==Not Installed (-)
doc8==Not Installed (-)
flake8==Not Installed (-)
jinja2==Not Installed (-)
mypy==Not Installed (-)
pydocstyle==Not Installed (-)
pylint==Not Installed (-)
pytest==Not Installed (-)
pytest-cov==Not Installed (-)
sphinx==Not Installed (-)
Installed pyani pip-install dependendencies...
pre-commit==Not Installed (-)
pytest-ordering==Not Installed (-)
sphinx-rtd-theme==Not Installed (-)
Installed third-party tool versions...
blast+==Linux_2.10.0+
nucmer==Linux_3.1
Traceback (most recent call last):
File "/opt/gensoft/exe/pyani/0.3.0a0/bin/pyani", line 8, in <module>
sys.exit(run_main())
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/scripts/pyani_script.py", line 105, in run_main
returnval = args.func(args)
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/scripts/subcommands/subcmd_listdeps.py", line 86, in subcmd_listdeps
for tool, version in get_tool_versions():
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/dependencies.py", line 117, in get_tool_versions
yield (name, func())
File "/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages/pyani/aniblastall.py", line 74, in get_version
version = re.search( # type: ignore
AttributeError: 'NoneType' object has no attribute 'group'
problem is that blastall
does not provide a --version option. when called blastall --version
it display an error message.
tested with legacy blast 2.2.19, 2.2.21, 2.2.25, 2.2.26.
tars-submit0:~ > blastall --version
[blastall] ERROR: Invalid argument: --version
it should be called with --help
instead of --version
furthermore blastall output in this case is deirected to stdout
not stderr
changing code from
This is concatenated with the OS name.
"""
cmdline = [blast_exe, "-version"]
result = subprocess.run(
cmdline, # type: ignore
shell=False,
stdout=subprocess.PIPE, # type: ignore
stderr=subprocess.PIPE,
check=False, # blastall doesn't return 0
)
version = re.search( # type: ignore
r"(?<=blastall\s)[0-9\.]*", str(result.stderr, "utf-8")
).group()
to
This is concatenated with the OS name.
"""
cmdline = [blast_exe, '--help']
result = subprocess.run(
cmdline, # type: ignore
shell=False,
stdout=subprocess.PIPE, # type: ignore
stderr=subprocess.PIPE,
check=False, # blastall doesn't return 0
)
version = re.search( # type: ignore
r"(?<=blastall\s)[0-9\.]*", str(result.stdout, "utf-8")
fix the problem see:
pyani listdeps 2>&1| tee log
System information
Platorm==Linux-4.18.0-193.19.1.el8_2.x86_64-x86_64-with-glibc2.2.5
Python==3.8.1 (default, May 22 2020, 14:09:57)
[GCC 9.2.0]
Installed pyani Python dependendencies...
Pillow==8.1.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
biopython==1.78 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
matplotlib==3.3.3 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
namedlist==1.8 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
networkx==2.5 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
numpy==1.19.5 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
openpyxl==Not Installed (-)
pandas==1.2.1 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
scipy==1.6.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
seaborn==0.11.1 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
sqlalchemy==1.3.22 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
tqdm==4.56.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
Installed pyani development dependendencies...
bandit==Not Installed (-)
black==Not Installed (-)
codecov==Not Installed (-)
coverage==Not Installed (-)
doc8==Not Installed (-)
flake8==Not Installed (-)
jinja2==Not Installed (-)
mypy==Not Installed (-)
pydocstyle==Not Installed (-)
pylint==Not Installed (-)
pytest==Not Installed (-)
pytest-cov==Not Installed (-)
sphinx==Not Installed (-)
Installed pyani pip-install dependendencies...
pre-commit==Not Installed (-)
pytest-ordering==Not Installed (-)
sphinx-rtd-theme==Not Installed (-)
Installed third-party tool versions...
blast+==Linux_2.10.0+
nucmer==Linux_3.1
blastall==Linux_2.2.26
[gensoft@345ddfccadad pyani-0.3.0a0]$
[gensoft@345ddfccadad pyani-0.3.0a0]$ pyani listdeps 2>&1| tee log
System information
Platorm==Linux-4.18.0-193.19.1.el8_2.x86_64-x86_64-with-glibc2.2.5
Python==3.8.1 (default, May 22 2020, 14:09:57)
[GCC 9.2.0]
Installed pyani Python dependendencies...
Pillow==8.1.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
biopython==1.78 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
matplotlib==3.3.3 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
namedlist==1.8 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
networkx==2.5 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
numpy==1.19.5 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
openpyxl==Not Installed (-)
pandas==1.2.1 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
scipy==1.6.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
seaborn==0.11.1 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
sqlalchemy==1.3.22 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
tqdm==4.56.0 (/opt/gensoft/exe/pyani/0.3.0a0/venv/lib/python3.8/site-packages)
Installed pyani development dependendencies...
bandit==Not Installed (-)
black==Not Installed (-)
codecov==Not Installed (-)
coverage==Not Installed (-)
doc8==Not Installed (-)
flake8==Not Installed (-)
jinja2==Not Installed (-)
mypy==Not Installed (-)
pydocstyle==Not Installed (-)
pylint==Not Installed (-)
pytest==Not Installed (-)
pytest-cov==Not Installed (-)
sphinx==Not Installed (-)
Installed pyani pip-install dependendencies...
pre-commit==Not Installed (-)
pytest-ordering==Not Installed (-)
sphinx-rtd-theme==Not Installed (-)
Installed third-party tool versions...
blast+==Linux_2.10.0+
nucmer==Linux_3.1
blastall==Linux_2.2.26
hope this will help
regards
Eric
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
This is fixed in #263. (But also, running just
pyani
outputs it in version0.3.0a0
, which is the version number shows up in your traceback.@widdowquinn None of the subcommands seem to have a working
--version
flag, despite collecting version information; I’ll see about adding that to #263.No - I’m implicitly going for “can’t find blastall” and the like with (1); (2) is just to account for how we need to call
blastall
.