Skip to content

Commit 6a670ce

Browse files
committed
README for traint/test set generation.
1 parent e8f61e5 commit 6a670ce

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
spliceai_train_code/

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![model](img/banner.png)
44

5-
Implementation of SpliceAI, Illumina's deep neural network to predict variant effects on splicing, in PyTorch.
5+
Implementation of SpliceAI, Illumina's deep neural network to predict variant effects on splicing, in PyTorch. You can find the Illumina's official implementation [here](https://github.com/Illumina/SpliceAI).
66

77
## Installation
88

@@ -13,4 +13,21 @@ pip install spliceai-pytorch
1313
## Usage
1414
```python
1515
from spliceai_pytorch import SpliceAI
16+
17+
```
18+
19+
## Generating train/test sets
20+
21+
First, download 'SpliceAI train code' directory from [here](https://basespace.illumina.com/s/5u6ThOblecrh) and unzip it to `spliceai_train_code` directory.
22+
Also, download human reference genome (version hg19) to `spliceai_train_code/reference` directory.
23+
24+
Then, run the following command to generate train/test sets after moving into `spliceai_train_code/Canonical`.
25+
26+
```bash
27+
chmod 755 grab_sequence.sh
28+
./grab_sequence.sh
29+
30+
# Requires Python 2.7, with numpy and h5py installed
31+
python create_datafile.py train all # ~4 miniutes, creates datafile_train_all.h5 (27G)
32+
python create_datafile.py test 0 # ~1 minute, creates datafile_test_0.h5 (2.4G)
1633
```

spliceai_pytorch/spliceai_pytorch.py

+4
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,8 @@ def from_preconfigured(model_name):
225225

226226
x = torch.randn([16, 4, 10000])
227227
model = SpliceAI_10k()
228+
print(model(x).shape)
229+
230+
x = torch.randn([16, 4, 10000 + 5000 + 1000])
231+
model = SpliceAI_10k()
228232
print(model(x).shape)

0 commit comments

Comments
 (0)