omicverse.fm.run

omicverse.fm.run(task, model_name, adata_path, output_path=None, batch_key=None, label_key=None, device='auto', batch_size=None, checkpoint_dir=None)[source]

Execute a foundation model task.

Parameters:
  • task (str) – Task type ('embed', 'annotate', 'integrate').

  • model_name (str) – Model to use.

  • adata_path (str) – Path to input .h5ad file.

  • output_path (str, optional) – Path for output .h5ad (default: overwrites input).

  • batch_key (str, optional) – Column in .obs for batch information.

  • label_key (str, optional) – Column in .obs for cell type labels.

  • device (str) – Device to use ('auto', 'cuda', 'cpu').

  • batch_size (int, optional) – Batch size for inference.

  • checkpoint_dir (str, optional) – Path to model checkpoints.

Returns:

Execution result with output path, keys, and statistics.

Return type:

dict