Skip to content
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

Fix add_sequence_neighbour_vector #336

Merged
merged 14 commits into from
Oct 26, 2023
Merged

Fix add_sequence_neighbour_vector #336

merged 14 commits into from
Oct 26, 2023

Conversation

anton-bushuiev
Copy link
Contributor

@anton-bushuiev anton-bushuiev commented Aug 26, 2023

Reference Issues/PRs

Hi, @a-r-j 👋! Currently, add_sequence_neighbour_vector has two bugs:

  • If conditions for adjacency fail, the vec from the previous iteration (pair of adjacent residues) is being used. So, the errors propagate silently. I fixed it to put zeros when conditions fail.
  • It does not handle insertion codes. Currently, I fixed it by parsing node ids first, but there probably may be a better way to get insertions.

I have also removed a redundant check for chain identity when iterating through the nodes of the same chain, and added a test.

What does this implement/fix? Explain your changes

What testing did you do to verify the changes in this PR?

Pull Request Checklist

  • Added a note about the modification or contribution to the ./CHANGELOG.md file (if applicable)
  • Added appropriate unit test functions in the ./graphein/tests/* directories (if applicable)
  • Modify documentation in the corresponding Jupyter Notebook under ./notebooks/ (if applicable)
  • Ran python -m py.test tests/ and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g., python -m py.test tests/protein/test_graphs.py)
  • Checked for style issues by running black . and isort .

@a-r-j
Copy link
Owner

a-r-j commented Sep 19, 2023

Thanks @anton-bushuiev, LGTM! Can you please add a short note to the changelog?

@anton-bushuiev
Copy link
Contributor Author

anton-bushuiev commented Oct 2, 2023

Hi, @a-r-j ! I have updated the changelog but I am not sure how it is currently with versioning.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@a-r-j a-r-j merged commit bc1bf30 into a-r-j:master Oct 26, 2023
15 of 16 checks passed
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