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

Fix Biopython deprecation warning #1102

Merged
merged 3 commits into from
Nov 29, 2022
Merged

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Nov 21, 2022

Description of proposed changes

CI is failing with the latest Biopython release.

BiopythonDeprecationWarning: myseq.ungap(gap) is deprecated; please use myseq.replace(gap, "") instead.

This PR applies the recommendation while retaining support for older Biopython versions.

Related issue(s)

N/A

Testing

  • Checks pass

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

This also makes it easier to refactor.
@victorlin victorlin self-assigned this Nov 21, 2022
@victorlin victorlin marked this pull request as draft November 21, 2022 19:28
@victorlin victorlin force-pushed the victorlin/fix-biopython-warning branch from 1c4d29b to 7bc1cbe Compare November 21, 2022 20:06
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Base: 63.36% // Head: 63.37% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (0799291) compared to base (a2d7660).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1102      +/-   ##
==========================================
+ Coverage   63.36%   63.37%   +0.01%     
==========================================
  Files          57       57              
  Lines        6635     6638       +3     
  Branches     1632     1632              
==========================================
+ Hits         4204     4207       +3     
  Misses       2147     2147              
  Partials      284      284              
Impacted Files Coverage Δ
augur/align.py 89.42% <100.00%> (+0.14%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

seq.ungap(gap) is deprecated as of biopython 1.80¹.

try/except is used to support older Biopython versions. A bump to
biopython>=1.79 would simplify this, but at the cost of narrowing
Biopython support to versions released June 2021 and later.

¹ https://github.com/biopython/biopython/blob/dcf52bd4546410e1a60d39fbcd4c0041ec1e6fe6/DEPRECATED.rst#bioseqsequngap
@victorlin victorlin force-pushed the victorlin/fix-biopython-warning branch from 7bc1cbe to e59a8b9 Compare November 21, 2022 21:18
@victorlin victorlin added the bug Something isn't working label Nov 21, 2022
@victorlin victorlin marked this pull request as ready for review November 21, 2022 22:37
@victorlin victorlin requested a review from a team November 21, 2022 22:37
Copy link
Contributor

@joverlee521 joverlee521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into this in tests for another PR, glad I checked on GH before trying to fix it 😄

@victorlin victorlin merged commit ff08d1b into master Nov 29, 2022
@victorlin victorlin deleted the victorlin/fix-biopython-warning branch November 29, 2022 22:07
@joverlee521 joverlee521 mentioned this pull request Nov 29, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants