-
Notifications
You must be signed in to change notification settings - Fork 128
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
BUG: Augur translate falsely claims BCBio.GFF not found when no features
file passed
#1151
Comments
Apparently we don't raise here, just returning none and printing an error message, not sure why we say "Error" and then not fail: Line 158 in 53fed2d
This is what I get if I try to import BCBio in the same conda environment manually: >>> from BCBio import GFF
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/Caskroom/miniforge/base/envs/nextstrain/lib/python3.10/site-packages/BCBio/GFF/__init__.py", line 3, in <module>
from BCBio.GFF.GFFParser import GFFParser, DiscoGFFParser, GFFExaminer, parse, parse_simple
File "/opt/homebrew/Caskroom/miniforge/base/envs/nextstrain/lib/python3.10/site-packages/BCBio/GFF/GFFParser.py", line 34, in <module>
from Bio.Seq import UnknownSeq
ImportError: cannot import name 'UnknownSeq' from 'Bio.Seq' (/opt/homebrew/Caskroom/miniforge/base/envs/nextstrain/lib/python3.10/site-packages/Bio/Seq.py) |
Aha, I have biopython 1.81 installed, which was released fairly recently, apparently 5 days ago? So we may need to restrict Augur to Biopython <=1.81 for now 😬 Seems like Biopython deprecated UnknownSeq without bumping a major version And indeed, 1.81 appeared on Biopython just 1:15hr ago. |
BCBio.GFF is only used in one place and by |
Bug report from 4d ago in BCBio: chapmanb/bcbb#136 |
1.81 is incompatible with BCBio.GFF which requires a module that was removed in 1.81 Partially resolves #1151
Now also visible in CI: https://github.com/nextstrain/augur/actions/runs/4205049112/jobs/7296575834#step:9:79 Maybe a case for running CI at least daily to automatically notice if a new package version causes issues? In this case, I spotted it quickly because I happened to manually update my environment and run into the bug in the wild, but would be good not to depend on manual updates or user reports. Given we install packages from Pypi preferentially, we should have been able to spot this bug already 4 days ago - since Pypi was about 4d ahead of conda-forge's 1.81 release. |
1.81 is incompatible with BCBio.GFF which requires a module that was removed in 1.81 Partially resolves #1151
@huddlej I tagged the PR #1152 as only partially resolving this issue as we are still not really handling import errors properly. We shouldn't return |
This made sense when it was added (in c6a9b24) but is not necessary now since all installation options (pip, Bioconda) should automatically install bcbio-gff as a dependency of Augur. The check gave potential for inaccurate error messages such as when an ImportError within the BCBio package is raised¹. ¹ #1151 (comment)
Current Behavior
When running the following command:
I get the error:
I confirmed that
bcbio-gff
is installed in my conda environment as (0.6.9 pyh5e36f6f_0 bioconda
).Expected behavior
The error seems to be that
len
is calculated of afeatures
variable which does not exist. This should have been validated earlier or caught appropriately. Reporting that BCBio.GFF isn't found is definitely incorrect.Also, it's maybe not ideal that we suggest to
pip install
- when we usually recommend conda/mamba nowadays. I couldn't find where thepip install
line was coming from in a quick search.Your environment: if browsing Nextstrain online
Your environment: if running Nextstrain locally
auspice 2.7.0
): augur 21.0.0The text was updated successfully, but these errors were encountered: