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

Modify graphs.py to handle insertions when {'insertions': True} #223

Merged
merged 12 commits into from
Dec 8, 2022

Conversation

manonreau
Copy link
Contributor

Reference Issues/PRs

The centroid coordinates of protein graphs contain NaN values when the PDB file contains at least one insertion and when {'insertions': True} is provided to ProteinGraphConfig

What does this implement/fix? Explain your changes

Adding the insertion identifier in the node_id and in the centroid atom grouping function solves the problem

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

Graph creation for 1i7z.
ex:
before modifications: ['A:ASP:1', 'A:LEU:2', 'A:PRO:95', 'A:TRP:96', ...]
G.coords #=> contains NaNs
after modifications:before modifications: ['A:ASP:1', 'A:LEU:2', 'A:PRO:95', 'A:TRP:96', ...]
G.coords #=> no NaN

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 a-r-j added bug Something isn't working 0 - Priority P0 Highest priority labels Nov 2, 2022
@sonarcloud
Copy link

sonarcloud bot commented Dec 7, 2022

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
1.1% 1.1% Duplication

@codecov-commenter
Copy link

Codecov Report

Base: 40.27% // Head: 47.93% // Increases project coverage by +7.66% 🎉

Coverage data is based on head (2693ecd) compared to base (8123f42).
Patch coverage: 52.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
+ Coverage   40.27%   47.93%   +7.66%     
==========================================
  Files          48       85      +37     
  Lines        2811     5411    +2600     
==========================================
+ Hits         1132     2594    +1462     
- Misses       1679     2817    +1138     
Impacted Files Coverage Δ
graphein/ml/diffusion.py 0.00% <0.00%> (ø)
graphein/ppi/graph_metadata.py 0.00% <0.00%> (ø)
graphein/ppi/visualisation.py 0.00% <0.00%> (ø)
graphein/protein/analysis.py 0.00% <0.00%> (ø)
graphein/protein/features/sequence/utils.py 28.00% <0.00%> (+3.00%) ⬆️
graphein/protein/features/utils.py 27.77% <0.00%> (ø)
graphein/rna/subgraphs.py 83.87% <ø> (ø)
graphein/rna/utils.py 38.46% <ø> (ø)
graphein/rna/visualisation.py 28.57% <ø> (+28.57%) ⬆️
graphein/utils/config.py 100.00% <ø> (+100.00%) ⬆️
... and 81 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@a-r-j a-r-j merged commit 75d5862 into a-r-j:master Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Priority P0 Highest priority bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants