Skip to content

Commit

Permalink
update profiles to latest guppy 6.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hiruna72 committed Feb 5, 2024
1 parent 8a6cda1 commit 65e1e3a
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 48 deletions.
36 changes: 26 additions & 10 deletions docs/move_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,32 @@ The second move corresponds with `2 x stride` signal points. The third with `4 x

Different models have different strides. Strides from some of the guppy models are listed below.

| Model | Stride |
|----------------------------------|--------|
| dna_r10.4.1_e8.2_400bps_fast.cfg | 5 |
| dna_r10.4.1_e8.2_400bps_hac.cfg | 5 |
| dna_r10.4.1_e8.2_400bps_sup.cfg | 5 |
| dna_r9.4.1_450bps_fast_prom.cfg | 5 |
| dna_r9.4.1_450bps_hac_prom.cfg | 5 |
| dna_r9.4.1_450bps_sup_prom.cfg | 5 |
| rna_r9.4.1_70bps_hac_prom.cfg | 10 |
| rna_r9.4.1_70bps_fast_prom.cfg | 12 |
| Model | Stride | Guppy version |
|---------------------------------------|--------|---------------|
| dna_r10.4.1_e8.2_400bps_fast.cfg | 5 | v6.3.7 |
| dna_r10.4.1_e8.2_400bps_hac.cfg | 5 | v6.3.7 |
| dna_r10.4.1_e8.2_400bps_sup.cfg | 5 | v6.3.7 |
| dna_r9.4.1_450bps_fast_prom.cfg | 5 | v6.3.7 |
| dna_r9.4.1_450bps_hac_prom.cfg | 5 | v6.3.7 |
| dna_r9.4.1_450bps_sup_prom.cfg | 5 | v6.3.7 |
| rna_r9.4.1_70bps_fast_prom.cfg | 12 | v6.3.7 |
| rna_r9.4.1_70bps_hac_prom.cfg | 10 | v6.3.7 |
| | | |
| dna_r10.4.1_e8.2_400bps_fast.cfg | 5 | v6.5.7 |
| dna_r10.4.1_e8.2_400bps_fast_prom.cfg | 5 | v6.5.7 |
| dna_r10.4.1_e8.2_400bps_hac.cfg | 5 | v6.5.7 |
| dna_r10.4.1_e8.2_400bps_hac_prom.cfg | 5 | v6.5.7 |
| dna_r10.4.1_e8.2_400bps_sup.cfg | 5 | v6.5.7 |
| dna_r9.4.1_450bps_fast.cfg | 5 | v6.5.7 |
| dna_r9.4.1_450bps_fast_prom.cfg | 5 | v6.5.7 |
| dna_r9.4.1_450bps_hac.cfg | 5 | v6.5.7 |
| dna_r9.4.1_450bps_hac_prom.cfg | 5 | v6.5.7 |
| dna_r9.4.1_450bps_sup.cfg | 5 | v6.5.7 |
| dna_r9.4.1_450bps_sup_prom.cfg | 5 | v6.5.7 |
| rna_r9.4.1_70bps_fast_prom.cfg | 12 | v6.5.7 |
| rna_r9.4.1_70bps_fast.cfg | 12 | v6.5.7 |
| rna_r9.4.1_70bps_hac.cfg | 10 | v6.5.7 |
| rna_r9.4.1_70bps_hac_prom.cfg | 10 | v6.5.7 |

As of [dorado_v0.4.0](https://github.com/nanoporetech/dorado/tree/v0.4.0) stride is used in three stages.
1. In the process of creating chunks to feed into the NN model ([code](https://github.com/nanoporetech/dorado/blob/b2af8e828a03d85448bb39ee5629660e6ef5e74f/dorado/read_pipeline/BasecallerNode.cpp#L78)).
Expand Down
40 changes: 29 additions & 11 deletions docs/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,35 @@ This document lists the different profiles.
The following precomputed kmer length and signal move offset values are available as profiles.
These profiles are used in `reform` tool. More information can be found at [reform](reform.md) and [calculate_offsets](calculate_offsets.md).

| | basecaller version | profile name | kmer length | sig move offset |
|-----|--------------------|------------------------------------|-------------|-----------------|
| DNA | guppy_v6.3.7 | guppy_dna_r9.4.1_450bps_fast_prom | 3 | 2 |
| DNA | guppy_v6.3.7 | guppy_dna_r9.4.1_450bps_hac_prom | 3 | 2 |
| DNA | guppy_v6.3.7 | guppy_dna_r9.4.1_450bps_sup_prom | 4 | 3 |
| DNA | guppy_v6.3.7 | guppy_dna_r10.4.1_e8.2_400bps_fast | 1 | 0 |
| DNA | guppy_v6.3.7 | guppy_dna_r10.4.1_e8.2_400bps_hac | 1 | 0 |
| DNA | guppy_v6.3.7 | guppy_dna_r10.4.1_e8.2_400bps_sup | 1 | 0 |
| | | | | |
| RNA | guppy_v6.3.7 | guppy_rna_r9.4.1_70bps_fast_prom | 1 | 0 |
| RNA | guppy_v6.3.7 | guppy_rna_r9.4.1_70bps_hac_prom | 1 | 0 |
| | basecaller versions | profile name | kmer length | sig move offset |
|---------|---------------------|-----------------------------------------|-------------|-----------------|
| ~~DNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_dna_r9.4.1_450bps_fast_prom~~ | ~~3~~ | ~~2~~ |
| ~~DNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_dna_r9.4.1_450bps_hac_prom~~ | ~~3~~ | ~~2~~ |
| ~~DNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_dna_r9.4.1_450bps_sup_prom~~ | ~~4~~ | ~~3~~ |
| ~~DNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_dna_r10.4.1_e8.2_400bps_fast~~ | ~~1~~ | ~~0~~ |
| ~~DNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_dna_r10.4.1_e8.2_400bps_hac~~ | ~~1~~ | ~~0~~ |
| ~~DNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_dna_r10.4.1_e8.2_400bps_sup~~ | ~~1~~ | ~~0~~ |
| | | | | |
| ~~RNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_rna_r9.4.1_70bps_fast_prom~~ | ~~1~~ | ~~0~~ |
| ~~RNA~~ | ~~guppy_v6.3.7~~ | ~~guppy_rna_r9.4.1_70bps_hac_prom~~ | ~~1~~ | ~~0~~ |
| | | | | |
| DNA | guppy_v6.5.7 | guppy_dna_r9.4.1_450bps_fast | 3 | 2 |
| DNA | guppy_v6.5.7 | guppy_dna_r9.4.1_450bps_fast_prom | 3 | 2 |
| DNA | guppy_v6.5.7 | guppy_dna_r9.4.1_450bps_hac | 3 | 2 |
| DNA | guppy_v6.5.7 | guppy_dna_r9.4.1_450bps_hac_prom | 3 | 2 |
| DNA | guppy_v6.5.7 | guppy_dna_r9.4.1_450bps_sup | 4 | 3 |
| DNA | guppy_v6.5.7 | guppy_dna_r9.4.1_450bps_sup_prom | 4 | 3 |
| | | | | |
| DNA | guppy_v6.5.7 | guppy_dna_r10.4.1_e8.2_400bps_fast | 2 | 1 |
| DNA | guppy_v6.5.7 | guppy_dna_r10.4.1_e8.2_400bps_fast_prom | 2 | 1 |
| DNA | guppy_v6.5.7 | guppy_dna_r10.4.1_e8.2_400bps_hac | 2 | 1 |
| DNA | guppy_v6.5.7 | guppy_dna_r10.4.1_e8.2_400bps_hac_prom | 2 | 1 |
| DNA | guppy_v6.5.7 | guppy_dna_r10.4.1_e8.2_400bps_sup | 2 | 1 |
| | | | | |
| RNA | guppy_v6.5.7 | guppy_rna_r9.4.1_70bps_fast | 1 | 0 |
| RNA | guppy_v6.5.7 | guppy_rna_r9.4.1_70bps_fast_prom | 1 | 0 |
| RNA | guppy_v6.5.7 | guppy_rna_r9.4.1_70bps_hac | 1 | 0 |
| RNA | guppy_v6.5.7 | guppy_rna_r9.4.1_70bps_hac_prom | 1 | 0 |

## Precomputed forward and reverse base shift values
The following precomputed forward and reverse base shift are available as profiles.
Expand Down
19 changes: 1 addition & 18 deletions docs/reform.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,7 @@ squigualiser reform -k ${KMER_LENGTH} -m ${SIG_MOVE_OFFSET} -c --bam basecalls.s

## Precomputed kmer lengths and signal move offsets

The following precomputed kmer length and signal move offset values are available as profiles in squigualiser.

These models were available in `ont-guppy_v6.3.7` and hence tested with `ont-guppy_v6.3.7`.

In the newer versions of `ont-guppy` we hope they don't change the model structure for the available ones.

We believe they will release models with proper names so that the old models are still identifiable.

We warmly welcome any pull request updating the following table with dorado models.

| profile | kmer length (k) | sig move offset (m) |
|------------------------------------|-----------------|---------------------|
| guppy_dna_r9.4.1_450bps_fast_prom | 3 | 2 |
| guppy_dna_r9.4.1_450bps_hac_prom | 3 | 2 |
| guppy_dna_r9.4.1_450bps_sup_prom | 4 | 3 |
| guppy_dna_r10.4.1_e8.2_400bps_fast | 1 | 0 |
| guppy_dna_r10.4.1_e8.2_400bps_hac | 1 | 0 |
| guppy_dna_r10.4.1_e8.2_400bps_sup | 1 | 0 |
Precomputed kmer lengths and signal move offsets can be found [here](profiles.md#precomputed-kmer-lengths-and-signal-moves-offsets).

If `reform` errors out with the message `"Error: specified profile is not found. Please run reform with -k 1 -s 0. Then run calculate_offsets.py and rerun reform with the recommended kmer_length and sig_move_offset."`, then the user is advised to run `calculate_offsets` subtool .
Information regarding `calcualte_offsets` is documented at [calculate_offsets](calculate_offsets.md).
Expand Down
7 changes: 1 addition & 6 deletions src/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,7 @@ def scale_signal(y, sig_scale, scale_params):
"kmer_model_dna_r9.4.1_450bps_6_mer": [-2, -3],
"kmer_model_rna_r9.4.1_70bps_5_mer": [-3, -1],
"kmer_model_dna_r10.4.1_e8.2_400bps_9_mer": [-6, -2],
"guppy_dna_r9.4.1_450bps_fast_prom": [0, 0],
"guppy_dna_r9.4.1_450bps_hac_prom": [0, 0],
"guppy_dna_r9.4.1_450bps_sup_prom": [0, 0],
"guppy_dna_r10.4.1_e8.2_400bps_fast": [0, 0],
"guppy_dna_r10.4.1_e8.2_400bps_hac": [0, 0],
"guppy_dna_r10.4.1_e8.2_400bps_sup": [0, 0]}
"corrected_at_reform": [0, 0]}
def list_profiles_base_shift():
# print(profile_dic)
print("{}\t{}\t{}".format("name", "base_shift_forward", "base_shift_reverse"))
Expand Down
16 changes: 13 additions & 3 deletions src/reform.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,22 @@
RNA_STRIDE = 10

profile_dic = {
"guppy_dna_r9.4.1_450bps_fast": [3, 2],
"guppy_dna_r9.4.1_450bps_fast_prom": [3, 2],
"guppy_dna_r9.4.1_450bps_hac": [3, 2],
"guppy_dna_r9.4.1_450bps_hac_prom": [3, 2],
"guppy_dna_r9.4.1_450bps_sup": [4, 3],
"guppy_dna_r9.4.1_450bps_sup_prom": [4, 3],
"guppy_dna_r10.4.1_e8.2_400bps_fast": [1, 0],
"guppy_dna_r10.4.1_e8.2_400bps_hac": [1, 0],
"guppy_dna_r10.4.1_e8.2_400bps_sup": [1, 0]}
"guppy_dna_r10.4.1_e8.2_400bps_fast": [2, 1],
"guppy_dna_r10.4.1_e8.2_400bps_fast_prom": [2, 1],
"guppy_dna_r10.4.1_e8.2_400bps_hac": [2, 1],
"guppy_dna_r10.4.1_e8.2_400bps_hac_prom": [2, 1],
"guppy_dna_r10.4.1_e8.2_400bps_sup": [2, 1],
"guppy_rna_r9.4.1_70bps_fast": [1, 0],
"guppy_rna_r9.4.1_70bps_fast_prom": [1, 0],
"guppy_rna_r9.4.1_70bps_hac": [1, 0],
"guppy_rna_r9.4.1_70bps_hac_prom": [1, 0]
}

def list_profiles():
# print(profile_dic)
Expand Down

0 comments on commit 65e1e3a

Please sign in to comment.