Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1943 +/- ##
==========================================
+ Coverage 85.03% 85.04% +0.01%
==========================================
Files 310 310
Lines 49960 49950 -10
==========================================
- Hits 42481 42478 -3
+ Misses 7479 7472 -7
Continue to review full report at Codecov.
|
| @@ -160,8 +160,12 @@ class Instances(list): | |||
|
|
|||
| def __init__(self, instances=None, alphabet=None): | |||
| """Initialize the class.""" | |||
There was a problem hiding this comment.
The docstring ought to explain the arguments, especially as you are changing how the alphabet argument is interpreted.
| from Bio.Seq import Seq | ||
| try: | ||
| # Received an old-style alphabet | ||
| alphabet = alphabet.letters |
There was a problem hiding this comment.
Could you call the internal variable letters instead of alphabet here? I would find that clearer.
|
This seems premature without a wider decision on removing or simplifying alphabets. I don't object to allowing passing a string of letters as an alternative input to an |
|
@peterjc The decision to remove alphabets has already been made. |
|
@mdehoon has it? Have I missed some important emails? |
Its only functionality (lowess) suffers from known bugs since 2014 and has seen no activity (other than style fixes) since 2008.
) * read nib header * added test * added a writer * cleanup header * cleanup * allow python2 * add documentation * include doctest * flake issues * flake issues * making flake happy * making flake happy * making flake happy * making flake happy * making flake happy * making flake happy * making flake happy * making flake happy * fix test_SeqIO_write.py * deal with nib special cases * fixing issues raised by Peter and appveyor * make nib files binary * fix for python2.4 * dont decode for python2
Squashed commit of pull reuqest biopython#1746, closes issue biopython#1731.
Also fixed a docstring for PEP257: 'The one-line docstring should NOT be a signature reiterating the function/method parameters (which can be obtained by introspection).'
$ flake8 Scripts/Restriction/ranacompiler.py Scripts/Restriction/ranacompiler.py:408:17: B007 Loop control variable 'n' not used within the loop body. If this is intended, start the name with an underscore. Scripts/Restriction/ranacompiler.py:671:21: B007 Loop control variable 'name' not used within the loop body. If this is intended, start the name with an underscore. With minor restructuring we didn't need the variables at all. Note B007 warning is from flake8-bugbear plugin, https://github.com/PyCQA/flake8-bugbear
This was failing locally, but not on TravisCI, which is odd: $ flake8 Scripts/ Scripts/query_pubmed.py:45:14: B007 Loop control variable 'arg' not used within the loop body. If this is intended, start the name with an underscore. Scripts/xbbtools/nextorf.py:198:26: B007 Loop control variable 'length' not used within the loop body. If this is intended, start the name with an underscore. Scripts/Performance/biosql_performance_read.py:23:5: B007 Loop control variable 'junk_id' not used within the loop body. If this is intended, start the name with an underscore. Scripts/Performance/biosql_performance_read.py:39:5: B007 Loop control variable 'junk_id' not used within the loop body. If this is intended, start the name with an underscore. Scripts/debug/debug_blast_parser.py:131:9: B007 Loop control variable 'err_file' not used within the loop body. If this is intended, start the name with an underscore. Scripts/debug/debug_blast_parser.py:131:19: B007 Loop control variable 'err_line' not used within the loop body. If this is intended, start the name with an underscore. Scripts/debug/debug_blast_parser.py:131:43: B007 Loop control variable 'err_text' not used within the loop body. If this is intended, start the name with an underscore. Scripts/debug/debug_blast_parser.py:240:14: B007 Loop control variable 'arg' not used within the loop body. If this is intended, start the name with an underscore. We currently ignore B007 in Bio/ etc.
Also updated the RST markup.
TODO: Follow up with changes to the tutorial to downplay usage of Bio.Aphabet
|
@peterjc Now that Bio.Alphabet has been declared obsolete, can we proceed with this pull request? |
|
If this just "removes alphabets as a requirement from Bio.motifs" I'd be happier, but it seems to go further and "removes Bio.Alphabets usage from Bio.motifs". In particular, if I am reading the diff correctly, the Or if you are happy with a backward incompatible change, I would be OK with removing the old object attribute To me that naming is clearer, since Update: Cross reference #2050 which declared |
|
Also, could we merge #1453 first, and then update this pull request to apply the needed alphabet changes in the new motif parsers that adds? |
…on into motifs_optional_alphabet
|
Starting a new pull request |
This pull request removes alphabets as a requirement from Bio.motifs.
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.rstfile and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)