-
Notifications
You must be signed in to change notification settings - Fork 22
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
Allow chain id to be assigned with chainid!() #35
Conversation
Adds two function for assigning the chainid, chainid!(chain, new_id) and chainid!(residue, new_id). For GitHub issue BioJulia#22.
Thanks for trying this, I agree it is not easy. What you have is a start but it is also important to update the key in the I think there should be a new error type, something like |
- Throw PDBConsistencyException when trying to change a chain's ID to an ID that already exists. - Throw PDBConsistencyException when moving a residue to a chain that already has a residue with that number. - Update the model's chain dictionary when changing a chain ID.
Thanks for the comments. I agree with your ideas. I've pushed a new commit I think addresses these shortcomings. |
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
==========================================
+ Coverage 95.29% 95.36% +0.06%
==========================================
Files 6 6
Lines 1553 1575 +22
==========================================
+ Hits 1480 1502 +22
Misses 73 73
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes. Just a few minor things and this is ready to merge.
- Added a test for ensuring KeyError thrown when ChainID changed to something else.
@jgreener64 made those changes. |
Great, thanks for the contribution! |
Adds two function for assigning the chainid, chainid!(chain, new_id) and chainid!(residue, new_id).
For issue #22
A clear and descriptive title (No issue numbers please)
Types of changes
This PR implements the following changes:
(Please tick any or all of the following that are applicable)
📋 Additional detail
If you have implemented new features or behaviour
Provide a description of the addition in as many details as possible.
Provide justification of the addition.
It's nice to be able to programmatically modify structures.
Provide a runnable example of use of your addition. This lets reviewers
and others try out the feature before it is merged or makes it's way to release.
I added some unit tests.
If you have changed current behaviour...
Describe the behaviour prior to you changes
Describe the behaviour after your changes and justify why you have made the changes,
Please describe any breakages you anticipate as a result of these changes.
Does your change alter APIs or existing exposed methods/types?
If so, this may cause dependency issues and breakages, so the maintainer
will need to consider this when versioning the next release.
If you are implementing changes that are intended to increase performance, you
should provide the results of a simple performance benchmark exercise
demonstrating the improvement. Especially if the changes make code less legible.