a-r-j / graphein

Protein Graph Library
https://graphein.ai/
MIT License
1.02k stars 129 forks source link

Graph plots #197

Open kamurani opened 2 years ago

kamurani commented 2 years ago

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

kamurani commented 2 years ago

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
)

image

kamurani commented 2 years ago

@a-r-j any changes you want me to make?

a-r-j commented 2 years ago

@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[bot] commented 2 years ago

SonarCloud Quality Gate failed.    Quality Gate failed

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

No Coverage information No Coverage information
10.5% 10.5% Duplication

a-r-j commented 1 year ago

.Hey @kamurani any chance you can approve this PR so we can get this merged in? Thanks!!

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

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

No Coverage information No Coverage information
5.8% 5.8% Duplication

sonarcloud[bot] commented 1 year ago

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 7 Code Smells

No Coverage information No Coverage information
1.7% 1.7% Duplication

sonarcloud[bot] commented 5 months ago

Quality Gate Failed 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