Error in GFFParser: UnknownSeq is deprecated in biopython 1.81
from Bio.Seq import UnknownSeq is deprecated in biopython 1.81 ( https://github.com/biopython/biopython/blob/dcf52bd4546410e1a60d39fbcd4c0041ec1e6fe6/DEPRECATED.rst#biosequnknownseq) and we have the error below:
from BCBio.GFF.GFFParser import GFFParser, DiscoGFFParser, GFFExaminer, parse, parse_simple
/usr/local/lib/python3.9/site-packages/BCBio/GFF/GFFParser.py:34: in <module>
from Bio.Seq import UnknownSeq
E ImportError: cannot import name 'UnknownSeq' from 'Bio.Seq' (/usr/local/lib/python3.9/site-packages/Bio/Seq.py)
I am reporting a problem with bcbio-gff-0.6.9, Biopython version 1.81.
Thanks! This came quite surprising, was there no deprecation warning added in Biopython 1.79? At least that would have allowed us to prepare :/
no deprecation warning added in Biopython 1.79
I never saw one, but maybe the code is not using it enough to trigger the warning (just an import and isinstance check)
So how can we correct the code to use?
Thanks very much for catching this issue and for the fix. There is a new 0.7.0 release on pypi that contains this fix. Apologies again about being slow to get this done and let me know if you run into any issues.
Excellent, thanks for this @chapmanb! The bioconda recipe needs to unpin Biopython for 0.7.0 then!
was there no deprecation warning added in Biopython 1.79?
There was, but it was suppressed by GFFParser. See #140
I think this can be closed now as of bcbio-gff 0.7.0