ge8rgia commited on
Commit
10504dc
·
verified ·
1 Parent(s): 250c690

Upload BPNet SOX2 ChIP-seq model (exp26_SOX2)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ exp26_SOX2.torch filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - bpnet
5
+ - bpnet-lite
6
+ - genomics
7
+ - chip-seq
8
+ - transcription-factor
9
+ - sox2
10
+ - mm10
11
+ library_name: bpnet-lite
12
+ ---
13
+
14
+ # BPNet_ChIP-seq_SOX2
15
+
16
+ A [BPNet](https://www.nature.com/articles/s41588-021-00782-6) model trained with
17
+ [`bpnet-lite`](https://github.com/jmschrei/bpnet-lite) on SOX2 ChIP-seq data,
18
+ used to model base-resolution binding signal and to discover sequence motifs via
19
+ TF-MoDISco.
20
+
21
+ ## Model details
22
+
23
+ - **Architecture:** BPNet (`bpnet-lite` implementation), ? filters,
24
+ ? dilated convolutional layers, with bias tracks for both the
25
+ profile and total-count heads.
26
+ - **Genome:** mm10
27
+ - **Input window:** 2114 bp sequence -> **output window:**
28
+ 1000 bp profile prediction
29
+ - **Training data:** SOX2 ChIP-seq, MACS2 narrow peaks as positive loci,
30
+ with a matched negative set.
31
+ - Peaks (loci): `/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_REP1.mLb.clN_peaks.bed`
32
+ - Signal (BAM): `exp26_SOX2.bw`
33
+ - Negatives: `/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_negatives_bpnet.bed`
34
+ - **Train/validation split (by chromosome):**
35
+ - Validation: ``
36
+ - Training: all other chromosomes (see `exp26_SOX2.bpnet.fit.json` for the
37
+ exact list)
38
+ - **Training hyperparameters:** lr=None, batch_size=None,
39
+ max_epochs=None, early_stopping=None epochs,
40
+ max_jitter=None, reverse_complement_augmentation=None
41
+ - **Checkpoint selection:** `exp26_SOX2.torch` is the best-validation-loss checkpoint saved
42
+ during training by `bpnet-lite`'s `fit` routine (as opposed to a `.final.torch` checkpoint,
43
+ which reflects the last training epoch and is not included here).
44
+
45
+ ## Performance
46
+
47
+ Reported metrics from `exp26_SOX2.performance.tsv`:
48
+
49
+ ```
50
+ profile_mnll profile_jsd profile_pearson profile_spearman count_pearson count_spearman count_mse
51
+ 472.9859924316406 0.44859686493873596 0.20588907599449158 0.06264603137969971 0.39160212874412537 0.3859022855758667 0.6483629941940308
52
+ ```
53
+
54
+ See `exp26_SOX2.evaluate.json` for the full evaluation output.
55
+
56
+ ## How to load
57
+
58
+ This model was trained with `bpnet-lite` and is saved as a raw PyTorch `state_dict`-style
59
+ `.torch` checkpoint (not a `transformers`-compatible format). To load it, install
60
+ `bpnet-lite` and use its `BPNet` class directly:
61
+
62
+ ```bash
63
+ pip install bpnet-lite
64
+ ```
65
+
66
+ ```python
67
+ import torch
68
+ from bpnetlite import BPNet
69
+
70
+ # Re-create the architecture with the same hyperparameters used in training
71
+ # (see exp26_SOX2.bpnet.fit.json for the full config)
72
+ model = BPNet(
73
+ n_filters=64,
74
+ n_layers=8,
75
+ profile_output_bias=True,
76
+ count_output_bias=True,
77
+ )
78
+
79
+ state_dict = torch.load("exp26_SOX2.torch", map_location="cpu")
80
+ model.load_state_dict(state_dict)
81
+ model.eval()
82
+ ```
83
+
84
+ > Double check the exact `BPNet(...)` constructor signature against the `bpnet-lite`
85
+ > version you have installed, since argument names/defaults can change between releases.
86
+ > Pin the same `bpnet-lite` version that produced this model if you need exact
87
+ > reproducibility — see `exp26_SOX2.log` for environment details if recorded.
88
+
89
+ ## Files
90
+
91
+ | File | Description |
92
+ |---|---|
93
+ | `exp26_SOX2.torch` | Model weights (best validation checkpoint) |
94
+ | `exp26_SOX2.bpnet.fit.json` | Full training configuration (architecture, data paths, chrom split, hyperparameters) |
95
+ | `exp26_SOX2.bpnet.attribute.json` | Configuration used for computing attributions downstream |
96
+ | `exp26_SOX2.performance.tsv` | Reported performance metrics |
97
+ | `exp26_SOX2.evaluate.json` | Full evaluation output |
98
+ | `exp26_SOX2.log` | Training log |
99
+
100
+ ## Citation
101
+
102
+ If you use this model, please cite the original BPNet paper and the `bpnet-lite`
103
+ software:
104
+
105
+ - Avsec et al., "Base-resolution models of transcription-factor binding reveal soft
106
+ motif syntax", *Nature Genetics*, 2021.
107
+ - `bpnet-lite`: https://github.com/jmschrei/bpnet-lite
108
+
109
+ ## Repo
110
+
111
+ `ge8rgia/BPNet_ChIP-seq_SOX2`
exp26_SOX2.bpnet.attribute.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attr_filename": "exp26_SOX2.attributions.attr.npz",
3
+ "batch_size": 64,
4
+ "chroms": [
5
+ "chr8",
6
+ "chr20"
7
+ ],
8
+ "device": "cuda",
9
+ "exclusion_lists": null,
10
+ "idx_filename": "exp26_SOX2.attributions.idxs.npy",
11
+ "in_window": 2114,
12
+ "loci": [
13
+ "/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_REP1.mLb.clN_peaks.bed"
14
+ ],
15
+ "model": "exp26_SOX2.torch",
16
+ "n_shuffles": 20,
17
+ "ohe_filename": "exp26_SOX2.attributions.ohe.npz",
18
+ "out_window": 1000,
19
+ "output": "counts",
20
+ "random_state": null,
21
+ "sequences": "/scratch/prj/stem_cells_pituitary/Georgia/genome/mm10/mm10.fa",
22
+ "skip": false,
23
+ "verbose": true,
24
+ "warning_threshold": 0.001
25
+ }
exp26_SOX2.bpnet.fit.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 64,
3
+ "controls": null,
4
+ "count_output_bias": true,
5
+ "device": "cuda",
6
+ "dtype": "float32",
7
+ "early_stopping": 5,
8
+ "exclusion_lists": null,
9
+ "in_window": 2114,
10
+ "loci": [
11
+ "/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_REP1.mLb.clN_peaks.bed"
12
+ ],
13
+ "lr": 0.001,
14
+ "max_counts": 99999999,
15
+ "max_epochs": 20,
16
+ "max_jitter": 128,
17
+ "min_counts": 0,
18
+ "n_filters": 64,
19
+ "n_layers": 8,
20
+ "name": "exp26_SOX2",
21
+ "negative_ratio": 0.333,
22
+ "negatives": [
23
+ "/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_negatives_bpnet.bed"
24
+ ],
25
+ "out_window": 1000,
26
+ "performance_filename": "exp26_SOX2.performance.tsv",
27
+ "profile_output_bias": true,
28
+ "random_state": null,
29
+ "reverse_complement": true,
30
+ "reverse_complement_average": true,
31
+ "scheduler": true,
32
+ "sequences": "/scratch/prj/stem_cells_pituitary/Georgia/genome/mm10/mm10.fa",
33
+ "signals": [
34
+ "exp26_SOX2.bw"
35
+ ],
36
+ "skip": false,
37
+ "summits": false,
38
+ "training_chroms": [
39
+ "chr2",
40
+ "chr4",
41
+ "chr5",
42
+ "chr7",
43
+ "chr9",
44
+ "chr10",
45
+ "chr11",
46
+ "chr12",
47
+ "chr13",
48
+ "chr14",
49
+ "chr15",
50
+ "chr16",
51
+ "chr17",
52
+ "chr18",
53
+ "chr19",
54
+ "chr21",
55
+ "chr22",
56
+ "chrX",
57
+ "chrY"
58
+ ],
59
+ "validation_chroms": [
60
+ "chr8",
61
+ "chr20"
62
+ ],
63
+ "verbose": true
64
+ }
exp26_SOX2.evaluate.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "batch_size": 64,
3
+ "chroms": [
4
+ "chr8",
5
+ "chr20"
6
+ ],
7
+ "controls": null,
8
+ "count_loss_weight": 236.43389892578125,
9
+ "count_output_bias": true,
10
+ "device": "cuda",
11
+ "dtype": "float32",
12
+ "early_stopping": 5,
13
+ "exclusion_lists": null,
14
+ "in_window": 2114,
15
+ "loci": [
16
+ "/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_REP1.mLb.clN_peaks.bed"
17
+ ],
18
+ "lr": 0.001,
19
+ "max_counts": 99999999,
20
+ "max_epochs": 20,
21
+ "max_jitter": 0,
22
+ "min_counts": 0,
23
+ "model": "exp26_SOX2.torch",
24
+ "n_filters": 64,
25
+ "n_layers": 8,
26
+ "name": "exp26_SOX2",
27
+ "negative_ratio": 0.333,
28
+ "negatives": [
29
+ "/scratch/prj/stem_cells_pituitary/Bence/atacseq_chip_results/26/bwa/merged_library/macs2/narrow_peak/SOX2_negatives_bpnet.bed"
30
+ ],
31
+ "out_window": 1000,
32
+ "performance_filename": "exp26_SOX2.performance.tsv",
33
+ "profile_output_bias": true,
34
+ "random_state": null,
35
+ "reverse_complement": false,
36
+ "reverse_complement_average": true,
37
+ "scheduler": true,
38
+ "sequences": "/scratch/prj/stem_cells_pituitary/Georgia/genome/mm10/mm10.fa",
39
+ "signals": [
40
+ "exp26_SOX2.bw"
41
+ ],
42
+ "skip": false,
43
+ "summits": false,
44
+ "training_chroms": [
45
+ "chr2",
46
+ "chr4",
47
+ "chr5",
48
+ "chr7",
49
+ "chr9",
50
+ "chr10",
51
+ "chr11",
52
+ "chr12",
53
+ "chr13",
54
+ "chr14",
55
+ "chr15",
56
+ "chr16",
57
+ "chr17",
58
+ "chr18",
59
+ "chr19",
60
+ "chr21",
61
+ "chr22",
62
+ "chrX",
63
+ "chrY"
64
+ ],
65
+ "validation_chroms": [
66
+ "chr8",
67
+ "chr20"
68
+ ],
69
+ "verbose": true
70
+ }
exp26_SOX2.log ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Epoch Iteration Training Time Validation Time Training MNLL Training Count MSE Validation MNLL Validation Profile Pearson Validation Count Pearson Validation Count MSE Saved?
2
+ 0 1081 12.538955688476562 0.22972440719604492 493.6463928222656 1.5571314096450806 498.90155029296875 0.1414016 0.25350755 0.9193392395973206 True
3
+ 1 2162 11.227972507476807 0.18920421600341797 468.42889404296875 1.212290644645691 489.6493835449219 0.16447474 0.2962626 0.794971227645874 True
4
+ 2 3243 11.230249166488647 0.18810677528381348 501.5304260253906 1.641969084739685 483.093017578125 0.17985299 0.3210969 0.787030041217804 True
5
+ 3 4324 11.219478607177734 0.18841266632080078 388.6416320800781 1.202521800994873 479.6177062988281 0.18650699 0.349209 0.7325787544250488 True
6
+ 4 5405 11.22038745880127 0.1877729892730713 387.3236083984375 0.5208539962768555 477.2947082519531 0.19270068 0.35677594 0.8444055318832397 False
7
+ 5 6486 11.229341745376587 0.18797850608825684 428.5082092285156 1.042463779449463 476.99267578125 0.19493777 0.36274323 0.722731351852417 True
8
+ 6 7567 11.225963115692139 0.18822121620178223 476.11187744140625 1.4584213495254517 476.9776306152344 0.19372638 0.3682373 0.9221944212913513 False
9
+ 7 8648 11.240039825439453 0.1881241798400879 502.65234375 1.389481544494629 476.1083679199219 0.19767307 0.37159348 0.8530063629150391 False
10
+ 8 9729 11.23106074333191 0.18815875053405762 537.5493774414062 1.5133410692214966 475.6878662109375 0.19802807 0.37246436 0.9266992807388306 False
11
+ 9 10810 11.224467277526855 0.18801069259643555 475.5256652832031 1.4387134313583374 476.7750549316406 0.19580016 0.38152167 1.542570948600769 False
12
+ 10 11891 11.22986125946045 0.188140869140625 449.2487487792969 0.7869852185249329 475.4999694824219 0.19919328 0.372169 0.6735904216766357 True
13
+ 11 12972 11.223177909851074 0.18834972381591797 479.9490051269531 0.8299573659896851 473.94085693359375 0.20223816 0.386478 0.8706695437431335 False
14
+ 12 14053 11.227935314178467 0.1881556510925293 359.5709533691406 0.7716255187988281 474.9963073730469 0.20094658 0.38978532 0.752129852771759 False
15
+ 13 15134 11.231069326400757 0.18865060806274414 456.62451171875 0.6766591668128967 473.44091796875 0.20359589 0.39161077 0.8789016008377075 False
16
+ 14 16215 11.22939133644104 0.18801569938659668 474.4501647949219 0.7873633503913879 476.0885009765625 0.19960625 0.3962401 0.7771286368370056 False
17
+ 15 17296 11.224156856536865 0.1884617805480957 486.74066162109375 0.7792139053344727 473.2563171386719 0.2054644 0.38726386 0.7868853211402893 False
exp26_SOX2.performance.tsv ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ profile_mnll profile_jsd profile_pearson profile_spearman count_pearson count_spearman count_mse
2
+ 472.9859924316406 0.44859686493873596 0.20588907599449158 0.06264603137969971 0.39160212874412537 0.3859022855758667 0.6483629941940308
exp26_SOX2.torch ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d420aa2b608d4167dab8ca4c2b3b0bef8e235c7369ced51f8a62dd10f0b069bd
3
+ size 453173