Deepspotm Tools#

Configuration File: deepspotm_tools.json Tool Type: Local Tools Count: 1

This page contains all tools defined in the deepspotm_tools.json configuration file.

Available Tools#

DeepSpotM_predict_gene_expression (Type: DeepSpotMTool)#

Predict spatial gene expression for a single H&E histology tile LOCALLY using the DeepSpot-M mult…

DeepSpotM_predict_gene_expression tool specification

Tool Information:

  • Name: DeepSpotM_predict_gene_expression

  • Type: DeepSpotMTool

  • Description: Predict spatial gene expression for a single H&E histology tile LOCALLY using the DeepSpot-M multimodal foundation model (no API, no key), giving a virtual spatial transcriptomics readout without running a spatial assay. Given a local path to a 224x224 H&E image and a list of HGNC gene symbols, returns expression for those genes in log1p-CPM units. DeepSpot-M represents genes as queryable embeddings drawn from DNA, RNA, protein, single-cell and text foundation models rather than as fixed outputs, so it spans the protein-coding transcriptome and covers genes unseen during training. Requesting specific genes is much cheaper than the full ~19k panel because only the requested gene queries run through the cross-attention decoder, so pass the genes you need. The tile must be exactly 224x224 px cut at roughly 20x (~0.5 microns per pixel), the magnification the model was trained on. Requires the optional ‘deepspotm’ package (pip install deepspotm) and access to its weights, which are gated on the Hugging Face Hub: request access at https://huggingface.co/ratschlab/DeepSpotM and run ‘huggingface-cli login’ first. The model is loaded lazily on first call and cached. Code is PolyForm Noncommercial 1.0.0 and weights are CC-BY-NC-SA-4.0.

Parameters:

  • image_path (string) (required) Path to a local 224x224 H&E histology tile (.png, .tif, .tiff, .jpg, .jpeg). Must be cut at roughly 20x (~0.5 microns per pixel).

  • genes (unknown) (required) Gene symbol(s) to predict, for example [‘EPCAM’, ‘CD3D’, ‘PTPRC’]. Required: the full ~19k-gene panel is deliberately not returned in one call.

  • source (string) (optional) Which frozen gene-embedding source to query the decoder with. Default ‘scgpt’.

  • device (string) (optional) Torch device, for example ‘cuda’ or ‘cpu’. Default ‘auto’, which uses CUDA when available.

  • model_repo (string) (optional) Hugging Face repo or local directory holding the checkpoint. Defaults to ‘ratschlab/DeepSpotM’.

Example Usage:

query = {
    "name": "DeepSpotM_predict_gene_expression",
    "arguments": {
        "image_path": "example_value",
        "genes": "example_value"
    }
}
result = tu.run(query)