graphein
graphein copied to clipboard
Graph plots
Reference Issues/PRs
couldn't find an issue that references this
What does this implement/fix? Explain your changes
add support for colouring / sizing asteroid plot nodes by different features. Extra functions can be added for more features if it is known how to reference the node data e.g. g.nodes(data=True)[k]['rsa']
change colourscheme to viridis (can revert this if it's unwanted)
What testing did you do to verify the changes in this PR?
Plotted example graphs.
Pull Request Checklist
- [x] Added a note about the modification or contribution to the
./CHANGELOG.mdfile (if applicable) - [x] 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) - [x] Checked for style issues by running
black .andisort .
Testing asteroid plot, scaling by RSA and colour by hydrophobicity
fig1 = asteroid_plot(
g=g,
node_id=node,
colour_nodes_by="hydrophobicity",
size_nodes_by='rsa',
node_size_multiplier=80
)

@a-r-j any changes you want me to make?
@a-r-j any changes you want me to make?
Hey, sorry - busy period. A few minor comments but otherwise LGTM. Thanks for the contributions!
SonarCloud Quality Gate failed. 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
9 Code Smells
No Coverage information
10.5% Duplication
.Hey @kamurani any chance you can approve this PR so we can get this merged in? Thanks!!
SonarCloud Quality Gate failed. 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
7 Code Smells
No Coverage information
5.8% Duplication
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
7 Code Smells
No Coverage information
1.7% Duplication
Quality Gate failed
Failed conditions
B Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint