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

deps: unpin biopython, pin bcbio-gff to 0.7* #1178

Merged
merged 2 commits into from
Mar 16, 2023

Conversation

corneliusroemer
Copy link
Member

@corneliusroemer corneliusroemer commented Mar 13, 2023

Biopython was pinned 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

Testing

We need to check that bcbio-gff actually works without problems

I think the error with bcbio-gff occured in translate, so we should test that part in particular, to make sure there are no regressions in bcbio-gff==0.7.0

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.

@corneliusroemer corneliusroemer requested a review from a team March 14, 2023 10:14
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 corneliusroemer force-pushed the unpin-biopython-pin-bcbio-gff branch from 928fdcf to 7204276 Compare March 14, 2023 10:40
@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (8b2dfc5) 68.25% compared to head (bbd53e5) 68.25%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1178   +/-   ##
=======================================
  Coverage   68.25%   68.25%           
=======================================
  Files          63       63           
  Lines        6772     6772           
  Branches     1659     1659           
=======================================
  Hits         4622     4622           
  Misses       1841     1841           
  Partials      309      309           
Impacted Files Coverage Δ
augur/__version__.py 100.00% <100.00%> (ø)

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@corneliusroemer
Copy link
Member Author

Rebased on current master, automatic and manual tests augur translate pass. I think this should be ready to be merged if no one objects.

Copy link
Member

@victorlin victorlin left a comment

Choose a reason for hiding this comment

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

I didn't test anything (not sure how to reproduce #1151), but the changes look good.

@corneliusroemer
Copy link
Member Author

The bug happened whenever one ran augur translate with biopython 1.81 and any bcbio-gff.

I tested with biopython 1.81 and bcbio-gff 0.7.0 and didn't get an error, so seems to be good.

@corneliusroemer
Copy link
Member Author

Alright, I managed to reproduce the bug by installing bcbio-gff 0.6.9, biopython 1.81 and running:

❌2 ❯ augur translate --reference-sequence defaults/annotation.gff --tree builds/21L/tree.nwk --ancestral-sequences builds/21L/nt_muts.json  --output-node-data test.json
Validating schema of 'builds/21L/nt_muts.json'...
Traceback (most recent call last):
  File "/Users/corneliusromer/code/augur/augur/__init__.py", line 67, in run
    return args.__command__.run(args)
  File "/Users/corneliusromer/code/augur/augur/translate.py", line 364, in run
    features = load_features(args.reference_sequence, genes)
  File "/Users/corneliusromer/code/augur/augur/utils.py", line 155, in load_features
    from BCBio import GFF
  File "/opt/homebrew/Caskroom/miniforge/base/envs/augur-dev/lib/python3.8/site-packages/BCBio/GFF/__init__.py", line 3, in <module>
    from BCBio.GFF.GFFParser import GFFParser, DiscoGFFParser, GFFExaminer, parse, parse_simple
  File "/opt/homebrew/Caskroom/miniforge/base/envs/augur-dev/lib/python3.8/site-packages/BCBio/GFF/GFFParser.py", line 34, in <module>
    from Bio.Seq import UnknownSeq
ImportError: cannot import name 'UnknownSeq' from 'Bio.Seq' (/opt/homebrew/Caskroom/miniforge/base/envs/augur-dev/lib/python3.8/site-packages/Bio/Seq.py)


An error occurred (see above) that has not been properly handled by Augur.
To report this, please open a new issue including the original command and the error above:
    <https://github.com/nextstrain/augur/issues/new/choose>

I had to edit the setup.py to allow installation of these otherwise not-allowed version (by constraints).

When I installed bcbio-gff 0.7.0 the bug no longer occurred. So 0.7.0 seems to fix it indeed.

And running the same command that errors with this PR does not produce an error. So all looks good.

@victorlin victorlin merged commit dd9f515 into master Mar 16, 2023
@victorlin victorlin deleted the unpin-biopython-pin-bcbio-gff branch March 16, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants