graphein icon indicating copy to clipboard operation
graphein copied to clipboard

Graph plots

Open kamurani opened this issue 3 years ago • 9 comments

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.md file (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 . and isort .

kamurani avatar Jul 22 '22 07:07 kamurani

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 avatar Jul 22 '22 07:07 kamurani

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

kamurani avatar Jul 26 '22 03:07 kamurani

@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!

a-r-j avatar Jul 26 '22 10:07 a-r-j

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

sonarqubecloud[bot] avatar Aug 02 '22 02:08 sonarqubecloud[bot]

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

a-r-j avatar Oct 23 '22 18:10 a-r-j

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

sonarqubecloud[bot] avatar Oct 31 '22 14:10 sonarqubecloud[bot]

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

sonarqubecloud[bot] avatar Feb 16 '23 23:02 sonarqubecloud[bot]

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

sonarqubecloud[bot] avatar Mar 25 '24 10:03 sonarqubecloud[bot]