Skip to main content

Python client for Malva Index

Project description

Malva Client

PyPI Documentation GitHub

Python client for the Malva genomic search platform. Search genes, sequences, and natural language queries across >7,000 single-cell and spatial transcriptomics samples.

For full documentation, visit malva-client.readthedocs.io.

Installation

pip install malva-client

For single-cell analysis workflows:

pip install malva-client scanpy

Authentication

Generate an API token at malva.bio (login with ORCID, then go to Profile > Generate API Token), then configure the client:

malva_client config --server https://malva.mdc-berlin.de --token YOUR_API_TOKEN

Quick Start (CLI)

malva_client search "CD3D" --output results.csv
malva_client search "ATCGATCGATCGATCGATCGATCG" --format json
malva_client search "CD4 T cells in brain tissue"

Quick Start (Python)

from malva_client import MalvaClient

client = MalvaClient("https://malva.mdc-berlin.de", "YOUR_API_TOKEN")

# Search for genes, sequences, or natural language queries
results = client.search("CD3D")
print(results)

# Search for sequences
results = client.search("ATCGATCGATCGCCACATGGACTTGAC")

# Natural language queries
results = client.search("cells expressing markers of neurodegeneration")

Per-cell matrices

# First run a normal expression search
result = client.search("SPP1")

# Retrieve positive cells from that search job
cells = client.retrieve_cells(result, sample_ids=[123456])

# Inspect positive cells or project them onto a coexpression index
cell_ids = cells.get_cell_ids(sample_ids=[123456])
coexpr = cells.project("human_cortex", sample_ids=[123456], top_n_genes=50)

# If you only need projection, keep the cell transfer server-side
coexpr = client.get_coexpression(result.job_id, "human_cortex", filter_sample_ids=[123456])

# If downstream code needs per-feature cell values, store them in the search job
value_result = client.search("SPP1", aggregate_expression=False)
value_cells = client.retrieve_cells(value_result, sample_ids=[123456])

Working with Results

# Enrich results with metadata
results.enrich_with_metadata()
fig = results.plot_expression_summary("cell_type")

# Filter and aggregate
filtered = results.filter_by(disease='normal', organ='brain')

See the tutorials for coverage analysis, dataset discovery, cell-level searches, and more.

Indexing Your Own Data

For local indexing and quantification, see Malva Tools (malva CLI).

Citation

If you use Malva in your research, please cite:

[TBA]

License

The Clear BSD License - Copyright (c) 2025-2026 Malva

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

malva_client-0.3.2.tar.gz (68.8 kB view details)

Uploaded Source

Built Distribution

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

malva_client-0.3.2-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

Details for the file malva_client-0.3.2.tar.gz.

File metadata

  • Download URL: malva_client-0.3.2.tar.gz
  • Upload date:
  • Size: 68.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for malva_client-0.3.2.tar.gz
Algorithm Hash digest
SHA256 1da8711e35bb5b9ac8aaeea8ca46b382e22af5cbd1dc1c57dcc469880fb8bf91
MD5 d500a92022b517c1476efbe69c2190eb
BLAKE2b-256 8309f1e21a94664bcf979cf700bdfe2716f21e9e69ace5b76af4da5fdd8f0d4a

See more details on using hashes here.

File details

Details for the file malva_client-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: malva_client-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 58.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for malva_client-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d2777eafc7ad7585098f1bbceb5e689aac013e3e0264cda6dd998a4febc35a3
MD5 c7f6fc8888b8917d9f32ff3425feed5a
BLAKE2b-256 9fce96d964afb6f77c177651fb69202ed38ecd4e1f28aa0f7d7e149a59623e84

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