File size: 1,687 Bytes
81cc1b1
 
 
b5205fe
 
27e43fe
b5205fe
 
 
 
 
 
81cc1b1
5e640f5
 
27e43fe
 
 
 
b5205fe
 
 
 
cb069d2
b5205fe
 
27e43fe
 
 
 
 
 
 
 
8319cd5
27e43fe
 
 
 
 
 
 
 
 
 
81cc1b1
27e43fe
8319cd5
 
27e43fe
 
 
81cc1b1
27e43fe
 
 
 
 
 
 
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
---
datasets:
- genbio-ai/transcript_isoform_expression_prediction
base_model:
- genbio-ai/AIDO.RNA-1.6B-CDS
- EleutherAI/enformer-official-rough
- facebook/esm2_t30_150M_UR50D
metrics:
- spearmanr
- r_squared
tags:
- biology
---
# Tri-modal model for RNA isoform expression prediction

## RNA isoform expression prediction
* Input: dna_seq, rna_seq, protein_seq
* Output: expression level in 30 tissues


## Model architecture 

<p align="left">
<img src="https://cdn-uploads.huggingface.co/production/uploads/63008d4bc1e149ceaff724a3/wKWIDdLu418MpXyihbCj9.png" alt="description" style="width:100%; height:auto;">
</p>

* Backbones: 
  * DNA: Enformer (fully finetuning)
  * RNA: AIDO.RNA-1.6B-CDS (lora finetuning)
  * Protein: ESM2-150M (lora finetuning)
* Fusion method: concat fusion


## Usage

**Download model**
```python
from huggingface_hub import snapshot_download
from pathlib import Path

model_name = "genbio-ai/AIDO.MM-Enformer-RNA-1.6B-CDS-ESM2-150M-ConcatFusion-rna-isoform-expression-ckpt"
genbio_models_path = Path.home().joinpath('genbio_models', model_name)
genbio_models_path.mkdir(parents=True, exist_ok=True)
snapshot_download(repo_id=model_name, local_dir=genbio_models_path)
```

**Evaluation script**

Once you download the model, you can use the model in [ModelGenertor](https://github.com/genbio-ai/ModelGenerator) using the following script:
```bash
CONFIG_FILE=...     # put the config file path here
CKPT_PATH=...       # put the model checkpoint path here

mgen test --config $CONFIG_FILE \
    --data.batch_size 16 \
    --trainer.logger null \
    --model.strict_loading False \
    --model.reset_optimizer_states True \
    --ckpt_path $CKPT_PATH
```