Skip to content

Hide an interaction/specific residue inclusively? #176

Answered by cbouy
ONISniperOne asked this question in Q&A
Discussion options

You must be logged in to vote

For the dataframe only you can pass a list of tuples of columns to drop e.g.

df.drop([("LIG1", "ALA209", "VdWContact")], axis=1)

So you need to specify the 3 levels (ligand, protein residue, and interaction type) for each residue and interaction that you want to hide.

For the lignetwork, there's no direct way of doing that, but you can directly play with the fp.ifp object which stores the data (make sure to save the fingerprint as a pickle file first):

# save
fp.to_pickle("fingerprint.pkl")

# setup things to clean
to_cleanup = [
    ("LIG1.G", "TYR38.A", "Hydrophobic"),
    ("LIG1.G", "TYR38.A", "VdWContact"),
]

# start cleanup
df = fp.to_dataframe()
for lig, residue, interaction in to_…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@cbouy
Comment options

@ONISniperOne
Comment options

@cbouy
Comment options

@ONISniperOne
Comment options

@cbouy
Comment options

Answer selected by ONISniperOne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants