ComfyUI Node
PSN ScRNA to Latent
Converts single-cell clustering results into a latent space representation for diffusion model visualization. Takes cluster data as JSON text (since we cannot use AnnData directly), extracts the gene expression profile for the selected cluster, encodes it into a fixed-size vector, and maps it to the latent space using deterministic random projection. Input format for adata_clustered (JSON text): {
PSN ScRNA to Latent
- bio_latent
- metadata
◄adata_clustered{"clusters": {"0": {"genes": [1.0, 2.0, 3.0]}}}►
◄cluster_id0►
◄latent_dim4►
◄seed42►
CategoryParametric/Data
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| adata_clustered | STRING | {"clusters": {"0": {"genes": [1.0, 2.0, 3.0]}}} | JSON text representing AnnData with clustering results |
| cluster_id | INT | 00–100000 | Specific cluster to visualize |
| latent_dim | INT | 41–1024 | Dimensionality of the target latent space |
| seedopt | INT | 420–2147483647 | Seed for deterministic random projection |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bio_latent | FLOAT | — |
| metadata | STRING | — |