Skip to main content

Tools to fetch and visualize JUMP images

Project description

JUMP-portrait

Utilities for interacting with the JUMP-Cell Painting Gallery dataset on AWS S3. We facilitate querying the JUMP-CP dataset index, retrieving metadata for specific perturbations, and loading microscopy images directly into memory or downloading them to local storage.

Main Functions

Metadata Retrieval

get_item_location_metadata

Search for a specific gene or compound by name or JCP ID to retrieve its location metadata (Source, Batch, Plate, Well, Site) and corresponding S3 URIs.

from jump_portrait.fetch import get_item_location_metadata

# Search for a gene by standard key
metadata = get_item_location_metadata("MYT1")

# Search for a compound by JCP ID
metadata = get_item_location_metadata("JCP2022_000001", input_column="JCP2022")

Image Retrieval

get_jump_image

Fetch a single image directly as a NumPy array using specific coordinate identifiers.

from jump_portrait.fetch import get_jump_image

img = get_jump_image(
    source="source_4",
    batch="2021_04_26_Batch1",
    plate="BR00121565",
    well="A01",
    channel="DNA",
    site=1
)

get_jump_image_batch

Load multiple images into memory in parallel based on a metadata table.

from jump_portrait.fetch import get_item_location_metadata, get_jump_image_batch

# Get metadata for a perturbation
metadata = get_item_location_metadata("MYT1")

# Load all DNA and Mito images for this perturbation into memory
meta_dicts, images = get_jump_image_batch(
    metadata, 
    channels=["DNA", "Mito"],
    site=[1, 2]
)

File Operations

download_jump_image_batch

Download a batch of images from S3 to a local directory in a structured or flattened format.

from jump_portrait.fetch import get_item_location_metadata, download_jump_image_batch

metadata = get_item_location_metadata("CLETVKMYAXARPO-UHFFFAOYSA-N")

# Download images to a local folder
download_jump_image_batch(
    metadata, 
    output_dir="./data/images", 
    channels=["DNA", "RNA"]
)

S3 Utilities

The jump_portrait.s3 module provides lower-level utilities for interacting with the Cell Painting Gallery:

  • get_image_from_s3uri(uri): Retrieves an image from a specific S3 URI and returns it as a NumPy array. Supports .tif, .tiff, .png, and .npy formats.
  • s3client(use_credentials=False): Creates a boto3 client configured for the gallery. By default, it uses unsigned requests (no AWS account required for public data).
  • download_s3uri(meta, output_dir): Downloads a specific file from the gallery based on metadata components.

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

jump_portrait-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

jump_portrait-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file jump_portrait-0.1.0.tar.gz.

File metadata

  • Download URL: jump_portrait-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jump_portrait-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c42cf46aed6303daefbd6260f77e66863fb310038ad4c26525a0331a1a8a397b
MD5 e43b8059c165854569396986718d4d1e
BLAKE2b-256 9b73b2afe790930997165ed2ef49168157eeb355ebdec7f30d74ad2fed79c638

See more details on using hashes here.

File details

Details for the file jump_portrait-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jump_portrait-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jump_portrait-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9b97fa2179b047295d1e5a43a10d14c422b4d208407ba386dde6c560543158
MD5 b39f2926b92be72108c89ddfe0e8df79
BLAKE2b-256 ca4c338d35607f8b1ba93bc5bfdd3a4f6e2d9de53600b98aafbc24d34061bbe3

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