jwkova commited on
Commit
f16c032
·
verified ·
1 Parent(s): 32c0de1

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +57 -8
README.md CHANGED
@@ -9,13 +9,20 @@ tags:
9
  - multimodal
10
  - mimic
11
  pretty_name: LORE Examples
 
12
  configs:
13
  - config_name: raw
14
  data_files: raw/examples.jsonl
 
15
  - config_name: tokenized
16
  data_files: tokenized/examples.jsonl
 
17
  ---
18
 
 
 
 
 
19
  # LORE Examples
20
 
21
  A small set of **matched multimodal examples** from LORE, for the
@@ -35,12 +42,13 @@ Two parallel views of the **same** rows, exposed as two dataset configs:
35
  | Config | Format | Use |
36
  |--------|--------|-----|
37
  | `raw` (`raw/examples.jsonl`) | modality name → raw value (nucleotide/AA string, per-position track, …) | `model.input([row])` — the tokenizers run for you |
38
- | `tokenized` (`tokenized/examples.jsonl`) | `tok_<modality>` → token-id list | `model.input([row])` — pre-tokenized; needed for `prot_struct` / text modalities on a base install |
39
 
40
- Every row carries `kind` (`rna` / `protein` / `both`) plus `uniprot_id` /
41
- `genome_feature_id` anchors. The `tokenized` view covers **all** modalities
42
- (including `prot_struct` and the free-text tracks); the `raw` view covers the
43
- modalities that invert without the optional `[structure]` / `[text]` extras.
 
44
 
45
  ## Usage
46
 
@@ -59,18 +67,59 @@ def to_sample(row):
59
  # raw view — modality name -> raw value; tokenizers run inside input()
60
  raw = load_dataset("polymathic-ai/LORE-examples", "raw", split="train")
61
  model.input([to_sample(raw[0])])
62
- reps = model.embed(sep_encodings=False)
63
 
64
  # tokenized view — tok_ keys with pre-tokenized ids
65
- # (covers prot_struct / text modalities without the optional extras)
66
  tok = load_dataset("polymathic-ai/LORE-examples", "tokenized", split="train")
67
  model.input([to_sample(tok[0])])
68
  ```
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  ## See also
71
 
72
  - **Model:** [`polymathic-ai/MIMIC`](https://huggingface.co/polymathic-ai/MIMIC) — the model these examples are for.
73
- - **Code:** [`PolymathicAI/MIMIC`](https://github.com/PolymathicAI/MIMIC) (`pip install mimic-cd`).
74
 
75
  ## Provenance & license
76
 
 
9
  - multimodal
10
  - mimic
11
  pretty_name: LORE Examples
12
+ thumbnail: https://raw.githubusercontent.com/PolymathicAI/MIMIC/main/assets/MIMIC_logo.png
13
  configs:
14
  - config_name: raw
15
  data_files: raw/examples.jsonl
16
+ default: true
17
  - config_name: tokenized
18
  data_files: tokenized/examples.jsonl
19
+ default_config_name: raw
20
  ---
21
 
22
+ <p align="center">
23
+ <img src="MIMIC_logo.png" alt="MIMIC" width="320">
24
+ </p>
25
+
26
  # LORE Examples
27
 
28
  A small set of **matched multimodal examples** from LORE, for the
 
42
  | Config | Format | Use |
43
  |--------|--------|-----|
44
  | `raw` (`raw/examples.jsonl`) | modality name → raw value (nucleotide/AA string, per-position track, …) | `model.input([row])` — the tokenizers run for you |
45
+ | `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 |
46
 
47
+ `raw` is the default config, so `load_dataset("polymathic-ai/LORE-examples")`
48
+ (no config name) loads it. Every row carries `kind` (`rna` / `protein` / `both`)
49
+ plus `uniprot_id` / `genome_feature_id` anchors. Both views cover the same rows
50
+ and the same modalities; `tokenized` just skips running the tokenizers (and the
51
+ one-time ESM3 weight download for `prot_struct`).
52
 
53
  ## Usage
54
 
 
67
  # raw view — modality name -> raw value; tokenizers run inside input()
68
  raw = load_dataset("polymathic-ai/LORE-examples", "raw", split="train")
69
  model.input([to_sample(raw[0])])
70
+ reps = model.embed() # {"full": [B, N, D], "mod_ids": [B, N]}
71
 
72
  # tokenized view — tok_ keys with pre-tokenized ids
73
+ # (skips running the BioBERT/ESM3 tokenizers; same rows as the raw view)
74
  tok = load_dataset("polymathic-ai/LORE-examples", "tokenized", split="train")
75
  model.input([to_sample(tok[0])])
76
  ```
77
 
78
+ ## Modalities
79
+
80
+ MIMIC represents each molecule as a set of co-observed modalities grouped into
81
+ three tracks: **nucleic** (RNA/DNA and its per-position annotations), **protein**
82
+ (amino-acid sequence, structure, and derived features), and **text** (free-text /
83
+ categorical context). Each row here populates a subset of these under its short name
84
+ (`raw` view) or its `tok_` key (`tokenized` view). The authoritative per-checkpoint
85
+ list is `model.modality_info`. A few assay tracks (`atac`, `cage`, `rasp2`,
86
+ `prot_abund`) are **context-conditional**: pass a free-text `context` alongside
87
+ them to condition on cell-state / assay metadata — the `Conditioning context`
88
+ column shows a real example for each.
89
+
90
+ | Modality | Track | Description | Example | Conditioning context (`tok_context`) |
91
+ |---|---|---|---|---|
92
+ | `rna_seq` | nucleic | RNA/DNA nucleotide sequence (unspliced) — the core nucleic input | `"UUUGGAAACUUU…"` | — |
93
+ | `cds_junctions` | nucleic | Coding-sequence (CDS) exon–exon junction positions, per position | `"…0001000…"` | — |
94
+ | `splice_regions` | nucleic | Splice-region (exon) annotation, per position | `"…0011100…"` | — |
95
+ | `splice_jctns_5cls` | nucleic | 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…"` | — |
96
+ | `is_coding` | nucleic | Coding vs. non-coding flag | `[1]` | — |
97
+ | `feature_type` | nucleic | Genomic feature-type label | `['protein_coding']` | — |
98
+ | `phylop_human` | nucleic | phyloP evolutionary-conservation score (human), per position | `[-0.66, 1.04, …]` | — |
99
+ | `phylop_mouse` | nucleic | phyloP evolutionary-conservation score (mouse), per position | `[-0.26, -0.92, …]` | — |
100
+ | `atac` | nucleic | ATAC-seq chromatin-accessibility signal, per position (`N` = unmeasured). **Cell-state-conditional** | `"…NNNN…"` | `"human, GM23338 lymphoblastoid cell line (EBV-transformed B lymphocyte)"` |
101
+ | `cage` | nucleic | CAGE transcription-start signal, per position. **Cell-state-conditional** | `[0.001, 0.001, …]` | `"skeletal muscle, human, fetal"` |
102
+ | `rasp2` | nucleic | 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"` |
103
+ | `aa_seq` | protein | Amino-acid (protein) sequence — the core protein input | `"MTPPERLFLP…"` | — |
104
+ | `rna_codons` | protein | Codon sequence aligned to the protein (nucleotide content, protein-aligned track) | `['AUG', 'ACA', 'CCA', …]` | — |
105
+ | `prot_struct` | protein | Protein 3D structure as ESM3 VQVAE tokens (decode to a backbone via `detokenize_structure`) | `[754, 1510, 49, …]` | — |
106
+ | `dssp` | protein | DSSP secondary-structure class, per residue | `"CCXX…HHH…"` | — |
107
+ | `sasa` | protein | Solvent-accessible surface area, per residue | `[225.1, 128.6, …]` | — |
108
+ | `prot_abund` | protein | Protein abundance (PaxDb ppm), scalar. **Cell-state-conditional** | `[385.6]` | `"Leptospira interrogans (bacterium), control"` |
109
+ | `funcprot_caption` | protein | Free-text protein functional caption | `"Catalyzes the hydrolysis of…"` | — |
110
+ | `masif_charge` | protein | MaSIF surface Poisson–Boltzmann charge, per vertex | `[6.9, -3.3, …]` | — |
111
+ | `masif_hbond` | protein | MaSIF surface hydrogen-bond potential, per vertex | `[-1.77, -1.64, …]` | — |
112
+ | `masif_hydrophobicity` | protein | MaSIF surface hydrophobicity, per vertex | `[0.32, -0.31, …]` | — |
113
+ | `masif_si_index` | protein | MaSIF surface shape-index, per vertex | `[0.34, 0.22, …]` | — |
114
+ | `masif_n_vertices` | protein | MaSIF surface vertex count, per patch | `[65.0, 42.0, …]` | — |
115
+ | `context` | text | Free-text semantic context (e.g. cell-state / assay) — the conditioning channel itself | `"HepG2 cell line"` | — |
116
+ | `corpus` | text | Free-text corpus / source label | `"UniProtKB/Swiss-Prot"` | — |
117
+ | `gene_family_txt` | text | Free-text gene-family description | `"Zinc-finger C2H2 family"` | — |
118
+
119
  ## See also
120
 
121
  - **Model:** [`polymathic-ai/MIMIC`](https://huggingface.co/polymathic-ai/MIMIC) — the model these examples are for.
122
+ - **Code:** [`PolymathicAI/MIMIC`](https://github.com/PolymathicAI/MIMIC) (`pip install git+https://github.com/PolymathicAI/MIMIC.git`).
123
 
124
  ## Provenance & license
125