| --- |
| license: mit |
| task_categories: |
| - feature-extraction |
| tags: |
| - biology |
| - genomics |
| - proteins |
| - multimodal |
| - mimic |
| pretty_name: LORE Examples |
| thumbnail: https://raw.githubusercontent.com/PolymathicAI/MIMIC/main/assets/MIMIC_logo.png |
| configs: |
| - config_name: raw |
| data_files: raw/examples.jsonl |
| default: true |
| - config_name: tokenized |
| data_files: tokenized/examples.jsonl |
| default_config_name: raw |
| --- |
| |
| <p align="center"> |
| <img src="MIMIC_logo.png" alt="MIMIC" width="320"> |
| </p> |
|
|
| # LORE Examples |
|
|
| A small set of **matched multimodal examples** from LORE, for the |
| [MIMIC](https://github.com/PolymathicAI/MIMIC) model — enough to try inference, |
| embedding, and generation across DNA, RNA, and protein modalities without wiring |
| up your own data. |
|
|
| Each example is a single biological entity (a transcript and/or its protein) with |
| several co-observed modalities. Rows are drawn from the held-out (validation) split |
| of MIMIC's training data, so they are in-distribution and length-bounded to the |
| model's context window. |
|
|
| ## Contents |
|
|
| Two parallel views of the **same** rows, exposed as two dataset configs: |
|
|
| | Config | Format | Use | |
| |--------|--------|-----| |
| | `raw` (`raw/examples.jsonl`) | modality name → raw value (nucleotide/AA string, per-position track, …) | `model.input([row])` — the tokenizers run for you | |
| | `tokenized` (`tokenized/examples.jsonl`) | `tok_<modality>` → token-id list | `model.input([row])` — pre-tokenized, so the heavy tokenizers (BioBERT text, ESM3 structure) don't run | |
|
|
| `raw` is the default config, so `load_dataset("polymathic-ai/LORE-examples")` |
| (no config name) loads it. Every row carries `kind` (`rna` / `protein` / `both`) |
| plus `uniprot_id` / `genome_feature_id` anchors. Both views cover the same rows |
| and the same modalities; `tokenized` just skips running the tokenizers (and the |
| one-time ESM3 weight download for `prot_struct`). |
|
|
| ## Usage |
|
|
| ```python |
| from datasets import load_dataset |
| from mimic import load_pretrained |
| |
| model = load_pretrained(version="1.0") |
| |
| ANCHORS = ("kind", "uniprot_id", "genome_feature_id") |
| |
| def to_sample(row): |
| # drop anchor columns and modalities absent from this row (stored as null) |
| return {k: v for k, v in row.items() if k not in ANCHORS and v is not None} |
| |
| # raw view — modality name -> raw value; tokenizers run inside input() |
| raw = load_dataset("polymathic-ai/LORE-examples", "raw", split="train") |
| model.input([to_sample(raw[0])]) |
| reps = model.embed() # {"full": [B, N, D], "mod_ids": [B, N]} |
| |
| # tokenized view — tok_ keys with pre-tokenized ids |
| # (skips running the BioBERT/ESM3 tokenizers; same rows as the raw view) |
| tok = load_dataset("polymathic-ai/LORE-examples", "tokenized", split="train") |
| model.input([to_sample(tok[0])]) |
| ``` |
|
|
| ## Modalities |
|
|
| MIMIC represents each molecule as a set of co-observed modalities grouped into |
| three tracks: **nucleic** (RNA/DNA and its per-position annotations), **protein** |
| (amino-acid sequence, structure, and derived features), and **text** (free-text / |
| categorical context). Each row here populates a subset of these under its short name |
| (`raw` view) or its `tok_` key (`tokenized` view). The authoritative per-checkpoint |
| list is `model.modality_info`. The `Dtype` column is the `raw`/decoded Python type; the `tokenized` config stores every modality as `list[int]`. A few assay tracks (`atac`, `cage`, `rasp2`, |
| `prot_abund`) are **context-conditional**: pass a free-text `context` alongside |
| them to condition on cell-state / assay metadata — the `Conditioning context` |
| column shows a real example for each. |
|
|
| | Modality | Track | Dtype | Description | Example | Conditioning context (`context`) | |
| |---|---|---|---|---|---| |
| | `rna_seq` | nucleic | `str` | RNA/DNA nucleotide sequence (unspliced) — the core nucleic input | `"UUUGGAAACUUU…"` | — | |
| | `cds_junctions` | nucleic | `str` | Coding-sequence (CDS) exon–exon junction positions, per position | `"…0001000…"` | — | |
| | `splice_regions` | nucleic | `str` | Splice-region (exon) annotation, per position | `"…0011100…"` | — | |
| | `splice_jctns_5cls` | nucleic | `str` | Per-position 5-class splice-site type: `0`=none, `1`=acceptor, `2`=donor, `3`=TSS (first-exon start), `4`=TES (last-exon end) | `"…00020…0100…"` | — | |
| | `is_coding` | nucleic | `list[int]` | Coding vs. non-coding flag | `[1]` | — | |
| | `feature_type` | nucleic | `list[str]` | Genomic feature-type label | `['protein_coding']` | — | |
| | `phylop_human` | nucleic | `list[float]` | phyloP evolutionary-conservation score (human), per position | `[-0.66, 1.04, …]` | — | |
| | `phylop_mouse` | nucleic | `list[float]` | phyloP evolutionary-conservation score (mouse), per position | `[-0.26, -0.92, …]` | — | |
| | `atac` | nucleic | `str` | ATAC-seq chromatin-accessibility signal, per position (`N` = unmeasured). **Cell-state-conditional** | `"…N888887…"` | `"human, GM23338 lymphoblastoid cell line (EBV-transformed B lymphocyte)"` | |
| | `cage` | nucleic | `list[float]` | CAGE transcription-start signal, per position. **Cell-state-conditional** | `[0.001, 0.001, …]` | `"skeletal muscle, human, fetal"` | |
| | `rasp2` | nucleic | `list[float]` | RASP2 (icSHAPE-style) RNA-structure reactivity, per position (`nan` where unmeasured). **Condition-conditional** | `[nan, 0.42, …]` | `"technology: icSHAPE, reagent: NAI-N3, in vivo, cell line: K562, human"` | |
| | `aa_seq` | protein | `str` | Amino-acid (protein) sequence — the core protein input | `"MTPPERLFLP…"` | — | |
| | `rna_codons` | protein | `list[str]` | Codon sequence aligned to the protein (nucleotide content, protein-aligned track) | `['AUG', 'ACA', 'CCA', …]` | — | |
| | `prot_struct` | protein | `biotite AtomArray` | Protein 3D structure as ESM3 VQVAE tokens (decode to a backbone via `detokenize_structure`) | `AtomArray (backbone)` | — | |
| | `dssp` | protein | `str` | DSSP secondary-structure class, per residue | `"CCXX…HHH…"` | — | |
| | `sasa` | protein | `list[float]` | Solvent-accessible surface area, per residue | `[225.1, 128.6, …]` | — | |
| | `prot_abund` | protein | `list[float]` | Protein abundance (PaxDb ppm), scalar. **Cell-state-conditional** | `[385.6]` | `"Leptospira interrogans (bacterium), control"` | |
| | `funcprot_caption` | protein | `str` | Free-text protein functional caption | `"Catalyzes the hydrolysis of…"` | — | |
| | `masif_charge` | protein | `list[float]` | MaSIF surface Poisson–Boltzmann charge, per vertex | `[6.9, -3.3, …]` | — | |
| | `masif_hbond` | protein | `list[float]` | MaSIF surface hydrogen-bond potential, per vertex | `[-1.77, -1.64, …]` | — | |
| | `masif_hydrophobicity` | protein | `list[float]` | MaSIF surface hydrophobicity, per vertex | `[0.32, -0.31, …]` | — | |
| | `masif_si_index` | protein | `list[float]` | MaSIF surface shape-index, per vertex | `[0.34, 0.22, …]` | — | |
| | `masif_n_vertices` | protein | `list[float]` | MaSIF surface vertex count, per patch | `[65.0, 42.0, …]` | — | |
| | `context` | text | `str` | Free-text semantic context (e.g. cell-state / assay) — the conditioning channel itself | `"HepG2 cell line"` | — | |
| | `corpus` | text | `str` | Free-text biomedical literature (PubMed abstracts / articles), used as a language corpus | `"…regulates cell-cycle arrest and apoptosis…"` | — | |
| | `gene_family_txt` | text | `str` | Organism taxonomic lineage as free text (broad clade → phylum → class → order → family → genus → species) | `"metazoa chordata mammalia primates hominidae homo homo sapiens"` | — | |
|
|
| ## See also |
|
|
| - **Model:** [`polymathic-ai/MIMIC`](https://huggingface.co/polymathic-ai/MIMIC) — the model these examples are for. |
| - **Code:** [`PolymathicAI/MIMIC`](https://github.com/PolymathicAI/MIMIC) (`pip install git+https://github.com/PolymathicAI/MIMIC.git`). |
|
|
| ## Provenance & license |
|
|
| Derived from the validation split of MIMIC's training corpus (LORE). Released under |
| the MIT license, matching the model code. See the |
| [MIMIC repository](https://github.com/PolymathicAI/MIMIC) for details and citation. |
|
|