Skip to main content

A collection of cheminformatics utility functions for use with marimo notebooks.

Project description

marimo-chem-utils

A collection of cheminformatics utility functions for use with marimo, an open-source reactive notebook for Python.

Installation

You can install marimo-chem-utils using pip:

pip install marimo-chem-utils

Usage

Here is an example of how to use some of the functions in this library.

import pandas as pd
import marimo as mo
from marimo_chem_utils import (
    add_fingerprint_column,
    add_image_column,
    add_inchi_key_column,
    add_tsne_columns,
    interactive_chart
)

# Load some data
df = pd.read_csv("https://raw.githubusercontent.com/PatWalters/datafiles/refs/heads/main/carbonic.csv")

# Add fingerprints, images, and InChI keys
df = add_fingerprint_column(df, fp_type="counts_fp")
df = add_image_column(df, smiles_column="SMILES")
df = add_inchi_key_column(df, smiles_column="SMILES")

# Generate t-SNE coordinates
df = add_tsne_columns(df)

# Create an interactive plot
chart = interactive_chart(df, x_col="TSNE_x", y_col="TSNE_y", color_col="PIC50", image_col="image")

# In a marimo cell, you would display the chart like this:
# mo.ui.altair_chart(chart)

This will create a pandas.DataFrame with additional columns for fingerprints, images, and InChI keys, and then generate an interactive t-SNE plot that you can explore in your marimo notebook. The plot will display molecule images in the tooltips.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marimo_chem_utils-0.1.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marimo_chem_utils-0.1.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file marimo_chem_utils-0.1.2.tar.gz.

File metadata

  • Download URL: marimo_chem_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for marimo_chem_utils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 71c9025176ad926f37e59ff25dbb06921d147d6182eb2f8fa1f28bd24ac0a52e
MD5 7bc7f98c84eb5cf171fbe8e95b90b6ef
BLAKE2b-256 1bceb5ebf6d5cb903a3d6bdf4510e66e371688bafa188ef95e01a387e1948af2

See more details on using hashes here.

File details

Details for the file marimo_chem_utils-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for marimo_chem_utils-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92c6bba5f641213d9e6ae23fe654c7ab3ad6334b2515848ccd011349238179ec
MD5 c5a76ebfd50dd0c09f529fefcc1ae07b
BLAKE2b-256 e4518ee87d85a1363800a65cf4d1630c71bbff18358619a19724a5173dbf0d78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page