File size: 2,342 Bytes
5589fb2 da04b1d 1b132ef da04b1d 5589fb2 c2da74a 5589fb2 da04b1d 5589fb2 28b6285 5589fb2 da04b1d 28b6285 da04b1d 28b6285 da04b1d 28b6285 da04b1d 28b6285 da04b1d 2ff3971 28b6285 da04b1d 28b6285 2ff3971 28b6285 da04b1d 28b6285 da04b1d 8fe2c49 da04b1d 1107d13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ---
title: Flexynesis Tissue VAE
emoji: 🧬
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.58.0
app_file: app.py
pinned: false
license: mit
---
# Flexynesis Tissue VAE
Upload a bulk RNA-seq gene expression matrix to get UBERON tissue-of-origin predictions and 121-dimensional latent embeddings.
## Model
Supervised variational autoencoder trained on **118,263 tissue-curated samples** from TCGA, GTEx, and ARCHS4 across **42 UBERON tissue categories** (cell lines excluded, classes balanced).
- **Balanced accuracy:** 94.9%
- **Weighted F1:** 96.2%
- **Latent space:** 121 dimensions
- **Genes:** 16,115 HGNC symbols
## How this demo runs
This Space runs the **trained model directly** via a 53 MB int8 TorchScript build (`vae_tissue_int8.torchscript.pt`) — exact VAE inference, no approximation. Uploaded samples are aligned to the 16,115 model genes, scaled, and encoded by the supervised VAE; tissue is predicted from the classifier head with softmax confidence. The full-precision model (`vae_tissue.final_model.pth`) and training data are deposited on Zenodo (https://doi.org/10.5281/zenodo.20595537); see the GitHub tutorial to reproduce.
## Input format
A CSV or TSV with **genes in rows and samples in columns** (the app auto-detects orientation and transposes if needed):
- First column: **HGNC gene symbols**
- Header row: sample IDs
- Values: **log2-transformed** expression (TPM, RPKM, or counts)
Example (first rows of the included `test_10samples.csv`):
```
,GSM3823940,ACH-000142,TCGA-CZ-4865-11,GTEX-1HFI6-0126
A1BG,8.73,2.74,4.81,2.35
A1CF,7.83,0.05,1.33,0.02
```
## Try it
A ready-to-use example, **`test_10samples.csv`** (10 samples), is included in this Space. Download it from the Files tab and upload it to see the demo run end to end.
## Output
For each sample, the app returns:
- Predicted **UBERON tissue** category
- **Confidence** (softmax probability from the VAE classifier)
- A downloadable **121-dimensional embedding** (CSV) and the full classification table (CSV)
## Citation
Pande A, Uyar B, Akalin A. An atlas-scale generative model for unified representation learning of bulk RNA-seq data. *bioRxiv* (2026).
## About
Akalin Lab, Max Delbrück Center for Molecular Medicine (MDC) Berlin/BIMSB
GitHub: https://github.com/BIMSBbioinfo/flexynesis_tissue_vae_manuscript
|