a-r-j / graphein

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

Visualisation of Protein Graphs #15

Closed a-r-j closed 3 years ago

a-r-j commented 4 years ago

Colouring options

Node Size options

Labelling options

Documentation

kamurani commented 2 years ago

Hi @a-r-j

Do we still want scaling node size by By feature magnitude (single or several?) as a feature?

I'm currently implementing it for a project anyway, but would be happy to submit a PR if we want an inbuilt way of doing so. maybe passing in a node_size_feature to plot_protein_structure_graph().

What do you reckon?

a-r-j commented 2 years ago

Hi @cimranm that'd be a great addition.

I'm not sure as to how to handle it most elegantly. One option is to use a string argument to grab a node feature from the graph (easier for the user maybe if only using scalar features, but a lot of them are stored as series/arrays etc) or node_size_feature is a dict

node_size_feature: Dict[str, float] = {"A:SER:2": 1.2, "A:GLY:3": 3.4, ...}

or an array of length num nodes:

node_size_feature: np.ndarray = np.array([1.2, 3.4,...])
len(node_size_feature) == len(g)

What do you think?

kamurani commented 2 years ago

Hmm, I've had a chance to look at it and i've given another PR. Not sure if the way i'm implementing it makes sense (I'm still new to this!) Would love to hear your thoughts @a-r-j