Skip to content

Commit

Permalink
Merge branch 'v4-models' into 'master'
Browse files Browse the repository at this point in the history
kit 14 v4.0.0 models

See merge request machine-learning/bonito!122
  • Loading branch information
iiSeymour committed Jan 6, 2023
2 parents 4960f5c + af0a443 commit 21df7d5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sre-test:
"script_parameters": {
"bonito_version":"'${CI_COMMIT_SHA}'",
"sre_output":"'${SRE_OUTPUT_ROOT}'/'${CI_COMMIT_SHA}'/",
"models":["dna_r10.4.1_e8.2_400bps_fast@v3.5.2","dna_r10.4.1_e8.2_400bps_hac@v3.5.2","dna_r10.4.1_e8.2_400bps_sup@v3.5.2"],
"models":["dna_r10.4.1_e8.2_400bps_fast@v4.0.0","dna_r10.4.1_e8.2_400bps_hac@v4.0.0","dna_r10.4.1_e8.2_400bps_sup@v4.0.0"],
"validation_set_path":"'${SRE_OUTPUT_ROOT}'/validation_sets",
"validation_data_type":"prom"
}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A PyTorch Basecaller for Oxford Nanopore Reads.
```bash
$ pip install --upgrade pip
$ pip install ont-bonito
$ bonito basecaller dna_r10.4_e8.1_sup@v3.4 /data/reads > basecalls.bam
$ bonito basecaller dna_r10.4_e8.1_sup@v4.0.0 /data/reads > basecalls.bam
```

By default `pip` will install `torch` which is build against CUDA 10.2. For CUDA 11.3 builds run:
Expand All @@ -25,7 +25,7 @@ $ pip install --extra-index-url https://download.pytorch.org/whl/cu113 ont-bonit
Bonito supports writing aligned/unaligned `{fastq, sam, bam, cram}`.

```bash
$ bonito basecaller dna_r10.4_e8.1_sup@v3.4 --reference reference.mmi /data/reads > basecalls.bam
$ bonito basecaller dna_r10.4_e8.1_sup@v4.0.0 --reference reference.mmi /data/reads > basecalls.bam
```

Bonito will download and cache the basecalling model automatically on first use but all models can be downloaded with -
Expand All @@ -40,7 +40,7 @@ $ bonito download --models # download all available models
Modified base calling is handled by [Remora](https://github.com/nanoporetech/remora).

```bash
$ bonito basecaller dna_r10.4_e8.1_sup@v3.4 /data/reads --modified-bases 5mC --reference ref.mmi > basecalls_with_mods.bam
$ bonito basecaller dna_r10.4_e8.1_sup@v4.0.0 /data/reads --modified-bases 5mC --reference ref.mmi > basecalls_with_mods.bam
```

To use the GPU-powered modified bases inference the `onnxruntime-gpu` package is required.
Expand All @@ -59,7 +59,7 @@ $ bonito train --directory /data/training/ctc-data /data/training/model-dir
In addition to training a new model from scratch you can also easily fine tune one of the pretrained models.

```bash
bonito train --epochs 1 --lr 5e-4 --pretrained dna_r10.4_e8.1_sup@v3.4 --directory /data/training/ctc-data /data/training/fine-tuned-model
bonito train --epochs 1 --lr 5e-4 --pretrained dna_r10.4_e8.1_sup@v4.0.0 --directory /data/training/ctc-data /data/training/fine-tuned-model
```

If you are interested in method development and don't have you own set of reads then a pre-prepared set is provide.
Expand Down
8 changes: 8 additions & 0 deletions bonito/cli/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ def download(self):


models = {
"[email protected]": "xsif8wbis1uyzsycopiql19p5mbd814n.zip",
"[email protected]": "cugqp8h9jrpfdgo696tzx5y3pxbjaqfl.zip",
"[email protected]": "fdxzet0grsp204a76mur3uiaeyx3i1x0.zip",

"[email protected]": "kf25wfgmmcda0457yx8u4f0t9vb2yozb.zip",
"[email protected]": "q5ecqe8c1u1pq4lrnyx9ypq070x1gbb8.zip",
"[email protected]": "ah2iqb80gfg7xncbwle7sgr2kq8l9437.zip",

"[email protected]": "7662ke4ccxp2s9645b9mdp68c6i26ait.zip",
"[email protected]": "k2p23nmw4k86lb5b4rlbapo8v3fidypn.zip",
"[email protected]": "wibs7gs3uu0vyf9dkjtvuez1zb9kvcpf.zip",
Expand Down

0 comments on commit 21df7d5

Please sign in to comment.