Marimo Widgets
Where I interact with my data
Introduction
In my last post, I talked about Marimo. This post, I would like to focus on the widgets geared towards my area of study, Cheminformatics. If you’ve been following Marimo and Pat Walters, you’d know that they are putting in a lot of effort in creating interactive widgets geared towards cheminfomratics. Pat Walters has even created a nice package for people to get started. It comes with some handy tools. These are great to make interactive charts when communicating to others in the lab.
Here I would like to demo the package, marimo_chem_utils. These have some nice built in tools that most users in the field would like - handling a dataframe, creating fingerprints, and reducing dimension and plotting it as a scatterplot. These are great as they are already ƒormatted for interactive usage in Marimo.
Code
Getting the project working is straightforward. For the dataset, I used a dummy set setup by Pat Walters. It contains molecules and their associated pIC50. I don’t know what activity it is for, but that is not important for this demo.
It is easy to process the dataset. Here I added a column for the molecular fingerprint, rendred the molecule as an RDKit image and appdend it as a column, added an inchi key column, and columns for the TSNE. That is a lot of stuff in only a few short lines of code!
Finally, the molecules can be rendered as an interactive scatterplot. This is done from the calculated TSNE values above. It is easy to do since these values were added to the DataFrame. Parameters were set to allow for the image of the molecule and its associated pIC50 value to “pop up” as the mouse hovers each scatter point.