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
Add support for NCBI BLAST XML v2 #1997
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1997 +/- ##
==========================================
+ Coverage 85.07% 85.11% +0.03%
==========================================
Files 314 314
Lines 50311 50438 +127
==========================================
+ Hits 42802 42929 +127
Misses 7509 7509
Continue to review full report at Codecov.
|
This looks impressive - I see you've split the existing BLAST XML parser into two using subclasses, did that seem easiest? Does this mean adding support for BLAST XML v2 to |
I do not use subclasses for parsing different XML versions, because parser doesn't know XML version beforehand. Instead actuall version is determined in the process of parsing based on root tag name. Blast XML v1 and v2 are very similar in structure and mainly differ just by tags names. So the process is very simple: start reading XML, look at the name of root node, determine version and then code setups the dictionary that matches XML tag name with the method that process it. As I can see Bio.SearchIO already uses some constant dictionaries that match tag name with a resulting objects properties. So for adding xml v2 support in SerachIO we can use different dictionaries depending on XML version. |
@peterjc I'm less familiar with the internals of And yes, SearchIO does indeed match XML tag names with object properties, since XML parsing is handled by |
3e46ad5
to
d678d2f
Compare
Rebased to deal with a trivial merge conflict in the NEWS file with the contributor names. I think this deserves a short |
Sounds like a good idea. It's also nice that @rtf-const already added the test files for v2 ~ which we can use for SearchIO as well :). |
This pull request addresses issue #1839
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 andTravisCI will be used to confirm the Biopython unit tests and
flake8
stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rst
andCONTRIB.rst
as part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)