Skip to content

Stop using Alphabet objects in Bio.motifs - #2066

Merged
mdehoon merged 1 commit into
biopython:masterfrom
mdehoon:motifs_make_alphabet_optional
May 23, 2019
Merged

mdehoon merged 1 commit into
biopython:masterfrom
mdehoon:motifs_make_alphabet_optional

Conversation

@mdehoon

@mdehoon mdehoon commented May 17, 2019

Copy link
Copy Markdown
Contributor

This pull request is a replacement of pull request #1943 .

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file and understand that AppVeyor and
    TravisCI will be used to confirm the Biopython unit tests and flake8 style
    checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

@codecov

codecov Bot commented May 17, 2019

Copy link
Copy Markdown

Codecov Report

Merging #2066 into master will increase coverage by <.01%.
The diff coverage is 71.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2066      +/-   ##
==========================================
+ Coverage   84.86%   84.87%   +<.01%     
==========================================
  Files         318      318              
  Lines       50885    50872      -13     
==========================================
- Hits        43183    43177       -6     
+ Misses       7702     7695       -7
Impacted Files Coverage Δ
Bio/motifs/pfm.py 6.38% <0%> (-0.66%) ⬇️
Bio/motifs/alignace.py 98% <100%> (-0.04%) ⬇️
Bio/motifs/transfac.py 78.12% <100%> (-0.14%) ⬇️
Bio/motifs/mast.py 92.92% <100%> (-0.07%) ⬇️
Bio/motifs/meme.py 80.89% <100%> (-0.08%) ⬇️
Bio/motifs/xms.py 76.27% <100%> (-0.4%) ⬇️
Bio/motifs/clusterbuster.py 94.87% <100%> (-0.13%) ⬇️
Bio/motifs/minimal.py 85.32% <50%> (-0.14%) ⬇️
Bio/motifs/matrix.py 82.13% <72.5%> (+0.99%) ⬆️
Bio/motifs/__init__.py 80.36% <77.77%> (+1.04%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd96ff0...d6eba9d. Read the comment docs.

@peterjc peterjc changed the title update Stop using Alphabet objects in Bio.motifs May 17, 2019
@peterjc

peterjc commented May 17, 2019

Copy link
Copy Markdown
Member

Follows on from #2050 declaring Bio.Alphabet to be obsolete.

See my concern #1943 (comment) about this being a potentially breaking change to the object type of the motif instance's .alphabet property (was an Alphabet object, now a plain string), and wondering if replacing it with a .letters property (the plain string of expected letters) would be sensible?

That would allow us to implement a stub .alphabet property as a getter with a deprecation warning, returning a generic Alphabet object based on the value of the proposed .letters property, and thus preserve API compatibility during the deprecation cycle.

@mdehoon

mdehoon commented May 17, 2019

Copy link
Copy Markdown
Contributor Author

@peterjc Thinking long-term, .alphabet is a better name than .letters. The former is clear, the latter could mean anything. Therefore I would like to continue to use .alphabet, even if it breaks backward compatibility. This property, like alphabets in general, is not really useful to the end user anyway.

@peterjc

peterjc commented May 17, 2019

Copy link
Copy Markdown
Member

OK then. It might mean some adjustment to my ideas for #2046, but that's still up in the air anyway.

@mdehoon
mdehoon merged commit 49892b2 into biopython:master May 23, 2019
@mdehoon
mdehoon deleted the motifs_make_alphabet_optional branch May 23, 2019 08:18
@victorlin victorlin mentioned this pull request May 27, 2019
3 tasks done
victorlin pushed a commit to victorlin/biopython that referenced this pull request May 30, 2019
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

Successfully merging this pull request may close these issues.

2 participants