We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See GPCRviz/flareplot
Add a to_flareplot option to Fingerprint.
to_flareplot
Fingerprint
Script used for RDKit UGM poster to visualize difference in interactions between active and inactive PDB structures:
import json jdict = { "edges": [], "trees": [{ "treeLabel": "TMs", "treeProperties": [] }], "tracks": [{ "trackLabel": "TMs", "trackProperties": [] }], "defaults": { "width": 2, "edgeOpacity": .85 } } TM_COLORS = { "TM1": "#ccebc5", "TM2": "#e8ce85", #"#ffffb3", "TM3": "#bebada", "TM4": "#fb8072", "TM5": "#80b1d3", "TM6": "#bc80bd", "TM7": "#b3de69", "H8": "#fccde5", } EDGE_COLORS = { 1: "#66c2a5", -1: "#fc8d62", 0: "#a9a9a9" } def get_name(res): resid = plf.ResidueId.from_string(res) aa = mda.lib.util.inverse_aa_codes[resid.name] return f"{aa}{resid.number}" # add nodes residues = sorted(set([ plf.ResidueId.from_string(r) for i in data.index.values for r in i ])) for resid in residues: res = str(resid) resid = plf.ResidueId.from_string(res) info = get_opsd_info(resid.number) domain = info["Label"] color = TM_COLORS.get(domain, False) if color is False: continue name = get_name(res) jdict["trees"][0]["treeProperties"].append({ "path": f"{domain}.{name}", "key": f"{resid.number}" }) jdict["tracks"][0]["trackProperties"].append({ "nodeName": name, "color": color, "size": .5 }) done = set() for (lres, pres), value in data.iteritems(): color = EDGE_COLORS[value] key = frozenset([lres, pres]) if key in done: continue done.add(key) jdict["edges"].append( {"name1": get_name(lres), "name2": get_name(pres), "frames": [0], "color": color} ) with open("flareplot.json", "w") as fh: json.dump(jdict, fh, indent=2)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
See GPCRviz/flareplot
Add a
to_flareplot
option toFingerprint
.Script used for RDKit UGM poster to visualize difference in interactions between active and inactive PDB structures:
The text was updated successfully, but these errors were encountered: