loki2.mil.prampt_generate.blca_metastasis_prampt

Generate PRAMPT data for BLCA metastasis analysis.

This script loads cell embeddings from .pt files, samples a subset of cells, and saves the merged embeddings as a parquet file for MIL training.

Module Contents

loki2.mil.prampt_generate.blca_metastasis_prampt.load_tensor(file_path: str | pathlib.Path) → Any

Load a CellGraphDataWSI written by loki2.detect_cells from a .pt file.

Parameters:

file_path – Path to the .pt file to load.

Returns:

Loaded torch object (typically containing cell embeddings and positions).

loki2.mil.prampt_generate.blca_metastasis_prampt.parse_args() → argparse.Namespace

Parse command-line arguments.

loki2.mil.prampt_generate.blca_metastasis_prampt.main(args: argparse.Namespace) → None

Build the metastasis PRAMPT table and write it to parquet.