File size: 2,027 Bytes
c9fdcea
 
 
 
 
 
 
 
 
 
 
 
c31c8c7
c9fdcea
c31c8c7
 
c9fdcea
c31c8c7
 
 
 
 
c9fdcea
c31c8c7
c9fdcea
c31c8c7
 
 
 
 
 
c9fdcea
c31c8c7
c9fdcea
c31c8c7
 
c9fdcea
c31c8c7
 
 
 
 
c9fdcea
c31c8c7
c9fdcea
c31c8c7
c9fdcea
c31c8c7
 
c9fdcea
 
c31c8c7
c9fdcea
 
c31c8c7
c9fdcea
c31c8c7
 
 
 
 
c9fdcea
 
c31c8c7
c9fdcea
c31c8c7
 
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
67
68
---
license: mit
pipeline_tag: other
tags:
- genomics
- dna
- webgpu
- wgsl
- genome-spy
- chrombpnet
---

# ChromBPNet WebGPU

7,560 model weight files for predicting chromatin accessibility from DNA (ATAC-seq and DNase-seq).
There are five models (folds) for each of 1,512 experiments.

Original models: [Kundaje Lab](https://huggingface.co/kundajelab), using ENCODE data.
These are the bias-corrected models, named `nobias` in the original release.

These `.bin` files need GenomeSpy's **`chrombpnet-wgsl@1` WebGPU runner**.
The runner code is not included here. For ONNX Runtime, use [ChromBPNet-ONNX](https://huggingface.co/genome-spy/ChromBPNet-ONNX).

## Main files

```text
models/<experiment>/fold_<n>/*.bin
manifest.json  # available models and file names
original-metadata.tar.gz  # original model descriptions
LICENSE
```

## Inputs and outputs

DNA uses four float32 channels in **A, C, G, T** order: 1 for the matching base,
0 otherwise. Unknown bases use four zeros. The runner processes one sequence at a time.

| Name | Shape | Meaning |
| --- | --- | --- |
| `sequence` | `[1, 4, 2114]` | DNA input |
| `profile_logits` | `[1, 1, 1000]` | Scores for each output position |
| `log_counts` | `[1, 1]` | log(1 + predicted total count) |

The 1,000 predicted bases start 557 bases into the input sequence (human hg38).

## Download a model

Install `huggingface_hub`. Choose a model from `manifest.json`; this example
downloads the first one for use with the runner above.

```python
import json
from pathlib import Path
from huggingface_hub import HfApi, hf_hub_download

repo = "genome-spy/ChromBPNet-WebGPU"
revision = HfApi().model_info(repo).sha
listing = hf_hub_download(repo, "manifest.json", revision=revision)
model = json.loads(Path(listing).read_text())["models"][0]
weights = hf_hub_download(repo, model["artifact"]["path"], revision=revision)
print(weights)
```

## License

Model weights: **MIT**. See [LICENSE](LICENSE). Original model details
and citations are kept in `original-metadata.tar.gz`.