Skip to main content

OmicVerse-inspired DataFrame and AnnData previews for JupyterLab

Project description

omicverse-notebook

JupyterLab plugin that brings the omicverse-web DataFrame and AnnData preview ideas into a standalone package.

It provides:

  • Rich output renderers for pandas.DataFrame, pandas.Series, and anndata.AnnData
  • A JupyterLab command that opens an OmicVerse Notebook panel for inspecting kernel variables by name
  • Automatic formatter activation for the active notebook or console kernel when the JupyterLab frontend extension is loaded
  • Color-coded DataFrame columns, sticky headers, compact shape cards, and AnnData slot summaries

Scope

This package intentionally focuses on the display layer:

  • kernel-side Python helpers turn variables into JSON preview payloads
  • JupyterLab frontend plugins render those payloads and provide a lightweight inspector UI

It does not depend on the omicverse-web Flask APIs.

Install

Development install:

cd omicverse-notebook
pip install -e .

For an end-user install, build a wheel first so the prebuilt labextension is bundled:

cd omicverse-notebook
jlpm install
jlpm build:prod
pip install .

Enable rich output

If the frontend extension is loaded correctly, it will try to enable formatters automatically for the active notebook or console kernel.

Manual fallback:

%load_ext omicverse_notebook

Or:

from omicverse_notebook import enable_formatters
enable_formatters()

After that, displaying a DataFrame or AnnData object in a notebook cell will use the OmicVerse renderers.

Inspector usage

Open Command Palette and run:

OmicVerse Notebook: Open

If rich output still does not appear in an already-running kernel, run:

OmicVerse Notebook: Enable Kernel Formatters

Then inspect variables like:

df
adata
adata.obs
adata.layers["counts"]
adata.obsm["X_umap"]

Notes

  • The inspector executes a small helper snippet in the current kernel and expects the Python package to be installed in that kernel environment.
  • AnnData is optional on install, but AnnData previews only activate if anndata is available in the kernel.

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

omicverse_notebook-0.1.2.tar.gz (118.7 kB view details)

Uploaded Source

Built Distribution

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

omicverse_notebook-0.1.2-py3-none-any.whl (59.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omicverse_notebook-0.1.2.tar.gz
  • Upload date:
  • Size: 118.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.10

File hashes

Hashes for omicverse_notebook-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2d2ca0254bdbe81cd29544ea10c93a7b122c38385fa89edceaf4c6b490d1393b
MD5 7b16759c6a91c851a7d9d7ed07be3e39
BLAKE2b-256 f0f1477fb551854bf38d963acdf722f32202e98b7c654576b72087f1946515b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for omicverse_notebook-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 db93d036c9cfb7b1c8f9f4fc64b2e1dbe0e7a19e7f261a6e44124786a52a1ee9
MD5 9a09c25e8232a90e33d1da7ef4b38675
BLAKE2b-256 53138e6f3392a0721301bd0476def0a14bfac82b2d15688f69313446a9bc2cdf

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