Skip to content
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

Error in GFFParser: UnknownSeq is deprecated in biopython 1.81 #136

Open
Kmassau opened this issue Feb 13, 2023 · 7 comments
Open

Error in GFFParser: UnknownSeq is deprecated in biopython 1.81 #136

Kmassau opened this issue Feb 13, 2023 · 7 comments

Comments

@Kmassau
Copy link

Kmassau commented Feb 13, 2023

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.

@corneliusroemer
Copy link

Thanks! This came quite surprising, was there no deprecation warning added in Biopython 1.79? At least that would have allowed us to prepare :/

@abretaud
Copy link
Contributor

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)

@StickHu
Copy link

StickHu commented Mar 13, 2023

So how can we correct the code to use?

mihailefter added a commit to mutalyzer/retriever that referenced this issue Mar 13, 2023
@chapmanb
Copy link
Owner

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.

@corneliusroemer
Copy link

Excellent, thanks for this @chapmanb! The bioconda recipe needs to unpin Biopython for 0.7.0 then!

corneliusroemer added a commit to nextstrain/augur that referenced this issue Mar 13, 2023
Biopython was fixed to <=1.80 in #1152
because bcbio-gff <=0.6.9 requires deprecated Biopython functionality that was removed in 1.81

A fix to bcbio-gff was released as 0.7.0, see chapmanb/bcbb#137 chapmanb/bcbb#136
So now we can pin bcbio-gff to >=0.7.0 and remove the pin
of Biopython

Note added in #1170 can hence be removed
corneliusroemer added a commit to nextstrain/augur that referenced this issue Mar 14, 2023
Biopython was fixed to <=1.80 in #1152
because bcbio-gff <=0.6.9 requires deprecated Biopython functionality that was removed in 1.81

A fix to bcbio-gff was released as 0.7.0, see chapmanb/bcbb#137 chapmanb/bcbb#136
So now we can pin bcbio-gff to >=0.7.0 and remove the pin
of Biopython

Note added in #1170 can hence be removed
cokelaer pushed a commit to cokelaer/bioconda-recipes that referenced this issue Apr 28, 2023
Merge PR bioconda#39703, commits were: 
 * Apply suggestions from code review
 * bcbio-gff: pin biopython

xref chapmanb/bcbb#136
@victorlin
Copy link

was there no deprecation warning added in Biopython 1.79?

There was, but it was suppressed by GFFParser. See #140

@corneliusroemer
Copy link

I think this can be closed now as of bcbio-gff 0.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants