Re: [Biopython] Solved Ubuntu bionic packaging issue: python-biopython-sql factored out too aggressively?
Peter Cock <[email protected]>
| Newsgroups | gmane.comp.python.bio.general |
|---|---|
| Message-ID | <CAKVJ-_5Ssb_y2urKiOPq3rP44m1z2AJO7G-epQ5BwVKdP8k6WA@mail.gmail.com> |
Good news - we fixed this already with Biopython 1.71 onwards, https://github.com/biopython/biopython/issues/1471 https://github.com/biopython/biopython/commit/cbbf8618c870bd5685a5299f201d717df3411cbd The Debian issue was: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=883860 Debian chose to split these up (and make other divisions like biopython-doc) which is fine as they have their own packaging policies. From Biopython's point of view we provide two top level namespaces, Bio and BioSQL, as part of a monolythic package. If you install from source or via Python's pip etc, then Bio and BioSQL will both be present. Conceptually Bio ought to work without BioSQL, but the BioSQL objects inherit from base objects in Bio so there is a strong dependency in that direction. Peter On Thu, Aug 23, 2018 at 3:54 PM Jan T Kim <[email protected]> wrote: > > Hi All, > > I ran into a problem when running a script that was working with > biopython 1.66 on Ubuntu xenial caused a problem with biopython 1.70 > on Ubuntu bionic: > > [...] > File "/usr/lib/python2.7/dist-packages/Bio/SeqRecord.py", line 440, in __getitem__ > from BioSQL.BioSeq import DBSeqRecord > ImportError: No module named BioSQL.BioSeq > > The offending import line, with a bit of context is: > > elif isinstance(index, slice): > if self.seq is None: > raise ValueError("If the sequence is None, we cannot slice it.") > parent_length = len(self) > from BioSQL.BioSeq import DBSeqRecord > if isinstance(self, DBSeqRecord): > > The problem was solved by installing python-biopython-sql [1]. Looking at > the "from BioSQL.BioSeq import DBSeqRecord" makes me wonder, though, > whether the Debian / Ubuntu package dependencies should allow installing > python-biopython without installing python-biopython-sql at all, as it > appears that the slicing functionality of SeqRecord won't work reliably > without the SQL package. However, the Ubuntu page on python-bioppython [2] > doesn't mention the python-biopython-sql package at all (not even as a > suggestion). > > While this issue is related to the Ubuntu bionic packaging, the root cause > of this dependency / tight coupling of python-biopython and python-biopython-sql > seems to be that import statement that's buried in a __getitem__ method, which > I'd consider a biopython design issue. It seems plausible to me that someone > building the python-biopython* packages could overlook this dependency, and > therefore jump to the conclusion that the -sql package can be factored out as > an optional package. > > I also post this in the hope that others who run into this issue may find > this solution in the mailing list archives... > > Best regards, Jan > > > [1] https://packages.ubuntu.com/bionic/python-biopython-sql > [2] https://packages.ubuntu.com/bionic/python-biopython > > _______________________________________________ > Biopython mailing list - [email protected] > http://mailman.open-bio.org/mailman/listinfo/biopython _______________________________________________ Biopython mailing list - [email protected] http://mailman.open-bio.org/mailman/listinfo/biopython