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.1.tar.gz (10.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.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jump_portrait-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.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.1.tar.gz
Algorithm Hash digest
SHA256 0ce6e0ab936752e3e27ac8c4d9bbd5309bfe405a003b30a1addeb0ba3a62a6a4
MD5 9023ac954c6820770cdd617f7609e706
BLAKE2b-256 6ed4de3f5cee24afa67dbed354988246a14ca00511df1aa6d023735e3c015274

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jump_portrait-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a2883b973220ea0ed6a562c01224ab73f3539d7c3e03eeca7943442551fe303
MD5 92bd545f837596fed1d84d8a7b6233c5
BLAKE2b-256 18ab6d868adb9acba4c5b6e0c5daaadcb3877ed957e823c5010cf2460d9852c9

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