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
SeqRecord broken on Debian packages when -sql package is not installed #1471
Comments
Just to confirm, installing |
As discussed on Twitter, due to change in Biopython 1.68 onwards 48cd6bc1 - CC @ctSkennerton Ideally all the We could implement |
Cross reference https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883860 (filed by @kblin) |
I'm a bit stumped on how to write a meaningful test for this, otherwise I'd propose a patch that'd only do the |
Currently, SeqRecord expects BioSQL to always be importable. That is not true on Debian packages, where the -sql package is needed to have BioSQL around. When BioSQL is not available, the instance in question should not be a DBSeqRecord, though. That means the else branch of that check should be safe. Signed-off-by: Kai Blin <kblin@biosustain.dtu.dk>
Not sure how to test if this works, though |
Closed via #1472 on the Biopython side, fix will be in our next release, i.e. Biopython 1.71 I suggest for Debian they back-port Kai's patch to whichever of the Biopython 1.68, 1.69 and 1.70 packages are still in active use. |
In terms of testing this (outside of Debian), one could hack the I have not done that (its bed time here), but perhaps I should have to be 100% sure we've fixed this. |
Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
This is a Debian 9 (stretch), with
python-biopython
installed andpython-biopython-sql
not installed.Expected behaviour
Calling
extract
on aSeqFeature
that's coming from aSeqRecord
loaded from a GenBank file on disk works.Actual behaviour
__getitem__
inSeqRecord
importsBioSQL.BioSeq
without atry/except
block, causing the script to crash.Steps to reproduce
Set up a pristine Debian install like this:
docker run --rm -it debian:stretch apt update && apt install -y python-biopython
Then run the following python script:
The text was updated successfully, but these errors were encountered: