Skip to main content

Python API for efficient storage and retrieval of single-cell data using TileDB

Project description

Overview

This is a Python implementation of the SOMA API specification for interacting with the Unified Single-cell Data Model.

Installation

TileDB-SOMA is available on PyPI and Conda, and can be installed via pip or mamba as indicated below.

python -m pip install tiledbsoma
mamba install -c conda-forge -c tiledb tiledbsoma-py

To install a specific version:

$ python -m pip install git+https://github.com/single-cell-data/TileDB-SOMA.git@0.0.6#subdirectory=apis/python

To update to the latest version:

$ python -m pip install --upgrade tiledbsoma

From source

  • This requires tiledb (see ./setup.cfg for version), in addition to other dependencies in setup.cfg.
  • Clone this repo
  • cd into your checkout and then cd apis/python
  • python -m pip install .
  • Or, if you wish to modify the code and run it, python -m pip install -v -e .
  • If the TileDB and TileDB-SOMA libraries are locally installed to a custom directory, such as /usr/local, set the path with environment variables TILEDB_PATH and TILEDBSOMA_PATH, TILEDB_PATH=/usr/local python -m pip install -v -e .
  • Optionally, if you prefer, you can run that inside venv:
    $ python -m venv venv
    $ . ./venv/bin/activate
    $ python -m pip install -v -e .
    
  • In either case:
    python -m pytest tests
    

Status

Please see https://github.com/single-cell-data/TileDB-SOMA/issues.

platform_config format

When accessing SOMA APIs, TileDB-specific settings can be configured with the platform_config parameter. The options accepted by TileDB SOMA are described here, using TypeScript interface syntax:

interface PlatformConfig {
  tiledb?: TDBConfig;
}

interface TDBConfig {
  create?: TDBCreateOptions;
}

interface TDBCreateOptions {
  dims?: { [dim: string]: TDBDimension };
  attrs?: { [attr: string]: TDBAttr };
  allows_duplicates?: bool;

  offsets_filters?: TDBFilter[];
  validity_filters?: TDBFilter[];

  capacity?: number;
  cell_order?: string;
  tile_order?: string;
}

interface TDBDimension {
  filters?: TDBFilter[];
  tile?: number;
}

interface TDBAttr {
  filters?: TDBFilter[];
}

/**
 * Either the name of a filter (in which case it will use
 * the default arguments) or a specification with filter args.
 */
type TDBFilter = string | TDBFilterSpec;

interface TDBFilterSpec {
  /** The name of the filter. */
  _name: string;
  /** kwargs that are passed when constructing the filter. */
  [kwarg: string]: any;
}

Information for developers

Please see the TileDB-SOMA wiki.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

tiledbsoma-1.10.2.tar.gz (280.4 kB view hashes)

Uploaded Source

Built Distributions

tiledbsoma-1.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

tiledbsoma-1.10.2-cp311-cp311-macosx_11_0_x86_64.whl (24.4 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ x86-64

tiledbsoma-1.10.2-cp311-cp311-macosx_11_0_arm64.whl (21.6 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

tiledbsoma-1.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

tiledbsoma-1.10.2-cp310-cp310-macosx_11_0_x86_64.whl (24.4 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ x86-64

tiledbsoma-1.10.2-cp310-cp310-macosx_11_0_arm64.whl (21.6 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

tiledbsoma-1.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tiledbsoma-1.10.2-cp39-cp39-macosx_11_0_x86_64.whl (24.4 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ x86-64

tiledbsoma-1.10.2-cp39-cp39-macosx_11_0_arm64.whl (21.6 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

tiledbsoma-1.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tiledbsoma-1.10.2-cp38-cp38-macosx_11_0_x86_64.whl (24.4 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ x86-64

tiledbsoma-1.10.2-cp38-cp38-macosx_11_0_arm64.whl (21.6 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

Supported by

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