Skip to content

Support residue insertion codes in SeqIO.PdbIO - #2215

Merged
peterjc merged 9 commits into
biopython:masterfrom
mukhyala:patch-2
Aug 21, 2019
Merged

peterjc merged 9 commits into
biopython:masterfrom
mukhyala:patch-2

Conversation

@mukhyala

@mukhyala mukhyala commented Aug 15, 2019 •

Copy link
Copy Markdown
Contributor

#2211

This pull request addresses issue #2211

  • 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, have run flake8 locally, and
    understand that AppVeyor and TravisCI will be used to confirm the Biopython unit
    tests and 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.)

@mukhyala
mukhyala requested a review from peterjc as a code owner August 15, 2019 06:17
@codecov

codecov Bot commented Aug 15, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #2215 into master will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2215      +/-   ##
==========================================
+ Coverage   84.69%   84.77%   +0.08%     
==========================================
  Files         317      317              
  Lines       51448    51463      +15     
==========================================
+ Hits        43576    43630      +54     
+ Misses       7872     7833      -39
Impacted Files Coverage Δ
Bio/SeqIO/PdbIO.py 94.44% <100%> (ø) ⬆️
Bio/HMM/Trainer.py 96.63% <0%> (ø) ⬆️
Bio/HMM/Utilities.py 15.78% <0%> (ø) ⬆️
Bio/HMM/MarkovModel.py 89.12% <0%> (ø) ⬆️
Bio/HMM/DynamicProgramming.py 93.47% <0%> (ø) ⬆️
Bio/SeqFeature.py 87.06% <0%> (+0.14%) ⬆️
Bio/Index.py 34.14% <0%> (+2.5%) ⬆️
Bio/Blast/Record.py 95.85% <0%> (+3.83%) ⬆️
Bio/Geo/Record.py 80% <0%> (+60%) ⬆️

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 3c6a2c2...6defcb1. Read the comment docs.

@peterjc

peterjc commented Aug 15, 2019

Copy link
Copy Markdown
Member

Can you find a tiny PDB file for a test? Or make a synthetic test in code?

@peterjc
peterjc requested a review from etal August 16, 2019 09:34

@peterjc peterjc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, but I want a structure person to comment - @etal maybe?

@peterjc peterjc changed the title Update PdbIO.py Support residue insertion codes in SeqIO.PdbIO Aug 16, 2019
@peterjc

peterjc commented Aug 19, 2019

Copy link
Copy Markdown
Member

Maybe @lennax, @JoaoRodrigues or @jgreener64 could take a quick look?

@jgreener64

Copy link
Copy Markdown
Contributor

I think the changed line was intended to do two things, as indicated by lines 65 and 70:

  • Find gaps to fill with Xs, e.g. skipping from residue 10 to 20.
  • Find out-of-order residues and warn about them (then ignore them), e.g. skipping from residue 20 to 10.

The change will make the code work with insertion codes but means that the second point above is ignored. Perhaps changing it to if rnumbers[i + 1] != rnum + 1 and rnumbers[i + 1] != rnum: instead would be better. In this case insertion codes are allowed but out-of-order residues are still found.

@mukhyala

Copy link
Copy Markdown
Contributor Author

Agreed, this will support both out of order residues and insertion codes. I committed the change.

@jgreener64

Copy link
Copy Markdown
Contributor

Thanks, in that case this looks good to me.

@peterjc

peterjc commented Aug 21, 2019

Copy link
Copy Markdown
Member

Do you want to add yourself to the NEWS.rst file too?

@mukhyala

Copy link
Copy Markdown
Contributor Author

Thanks, I wasn't sure if this change meets the criteria for adding to release NEWS.

@peterjc

peterjc commented Aug 21, 2019

Copy link
Copy Markdown
Member

Absolutely - you could say it was only one line of code in the main library, but it is a bug fix with tests etc.

@peterjc
peterjc merged commit fbbea79 into biopython:master Aug 21, 2019
peterjc added a commit to peterjc/biopython that referenced this pull request Sep 3, 2019
Original author Eric Talevich and the contributors since as tracked
with version control have all agreed:

 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Devang Thakkar (@DevangThakkar)
   biopython#1845
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Francesco Gastaldello (@Gasta88)
   biopython#1063
 - Kiran Mukhyala (@mukhyala)
   biopython#2215
 - Matsuyuki Shirota (@matsu3shiro)
   biopython#2244 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Stefans Mezulis (@StefansM)
   biopython#1445
 - Wayne Decatur (@fomightez)
   biopython#898 (comment)
 - Wibowo Arindrarto (@bow)
   biopython#898 (comment)
peterjc added a commit that referenced this pull request Nov 4, 2019
Original author Eric Talevich and the contributors since as tracked
with version control have all agreed:

 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Devang Thakkar (@DevangThakkar)
   #1845
 - Eric Talevich (@etal)
   #898 (comment)
 - Francesco Gastaldello (@Gasta88)
   #1063
 - Kiran Mukhyala (@mukhyala)
   #2215
 - Matsuyuki Shirota (@matsu3shiro)
   #2244 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Stefans Mezulis (@StefansM)
   #1445
 - Wayne Decatur (@fomightez)
   #898 (comment)
 - Wibowo Arindrarto (@bow)
   #898 (comment)
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.

4 participants