ONT's newest basecaller, Dorado, can do this for SAM output with the --emit-moves
argument. It was added in this commit.
Dorado can be downloaded from here:
https://github.com/nanoporetech/dorado
Here's an example command line:
$ ~/install/dorado/dorado-0.2.1-linux-x64/bin/dorado basecaller --emit-moves \
~/install/dorado/dorado-0.2.1-linux-x64/[email protected] DAE_pod5 | \
samtools view -b - > called_DAE_gDNA_reads_all.bam
And a few lines of example output:
@HD VN:1.6 SO:unknown
@PG ID:basecaller PN:dorado VN:0.2.1+c70423e CL:dorado basecaller --emit-moves /home/minion/install/dorado/dorado-0.2.1-linux-x64/[email protected] DAE_pod5
@PG ID:samtools PN:samtools PP:basecaller VN:1.10 CL:samtools view -b -
@PG ID:samtools.1 PN:samtools PP:samtools VN:1.10 CL:samtools view -h called_DAE_gDNA_reads_all.bam
@RG ID:460fc479-3b30-4ed5-801f-a82bbe556101_dna_r10.4.1_e8.2_260bps_sup@v4.1.0 PU:PAK83314 PM: DT:2023-02-08T10:22:53.256+00:00 PL:ONT DS:[email protected] runid=460fc479-3b30-4ed5-801f-a82bbe556101 LB:DAE_gDNA SM:DAE_gDNA
@RG ID:227379b1-c5fc-465d-9e24-eb771133f11e_dna_r10.4.1_e8.2_260bps_sup@v4.1.0 PU:PAK83314 PM: DT:2023-02-08T20:28:34.34+00:00 PL:ONT DS:[email protected] runid=227379b1-c5fc-465d-9e24-eb771133f11e LB:no_sample SM:no_sample
003d84eb-ce0f-47ea-9c7c-fe939fe8702e 4 * 0 0 * * 0 110 GTGCCTCCTTGCTTTGGTTCAGTTCTATCCAGCCTTTAGATATCCCAGCCCTCACAGGGTTTGTGTGACCTTGTTGCATTATCATGCGAAACACTTTCGCGTTTTTAGTG %%%%%(&%%&%%'((''))*.-,-''&&&'&&&(%$$$%&&&'%%%%&(*))'&&&&)-05>6;>>777887++'&&&&&&%%%&*.....0820001:;;;<<87''&& qs:i:7 du:f:0.526 ns:i:2104 ts:i:10 mx:i:4 ch:i:1037 st:Z:2023-02-09T07:07:00.271+00:00 rn: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TACTTCGTTCAGTTGTGAAAACTGGGTGTTTAACCTTTGATTCTATCGTGTTTCCCTAGTTTTCGCATTTGACGTGAAACGCTTTCACATTTTGGT &&'''&%%%%((((*+)***())((')&%%%%$%%%'--,,,,-6996/,+-5ABBBCCFBCE>88:1764424/--,,--&%$$%*08??;;;;<B<:((('()// qs:i:9 du:f:0.92975 ns:i:3719 ts:i:10 mx:i:4 ch:i:1058 st:Z:2023-02-09T07:07:08.905+00:00 rn:i:62167 f5:Z:PAK83314_fail_unclassified_227379b1_ea81734c_853.pod5 sm:f:85.094 sd:f:23.944 sv:Z:quantile RG:Z:227379b1-c5fc-465d-9e24-eb771133f11e_dna_r10.4.1_e8.2_260bps_sup@v4.1.0 mv:B:c,5,1,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,1,0,1,0,1,0,0,1,0,0,1,0,1,1,0,0,1,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,0,1,0,0,1,0,0,1,0,1,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,0,0,0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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ATTTTAGTTGTGTAATTTCTACCATTTAAATGGGGTGAATAAATAACCAAATCATTGAACAACTGGAATG &&&')'&%$$##$&&''+,-)''&'')**'&%&''))&&&)'((*+8<AEEFGHJIJIJIICA@;843344:254,,,,CEE>====7<<<>>@=?+***'&&''(''&%%%%$%%&)1//..-+,+*'&'(+2+++45<ACCC66677@75556+((((55>@AEFHFHGFEHHJHHFHIKJGFFFKLHZEGEGGIDFDDCDDERKIEGDG>=>5332/'&&&&)**,2242. qs:i:10 du:f:0.69975 ns:i:2799 ts:i:10 mx:i:4 ch:i:1933 st:Z:2023-02-09T07:07:01.924+00:00 rn:i:77788 f5:Z:PAK83314_fail_unclassified_227379b1_ea81734c_853.pod5 sm:f:97.397 sd:f:27.276 sv:Z:quantile RG:Z:227379b1c5fc-465d-9e24-eb771133f11e_dna_r10.4.1_e8.2_260bps_sup@v4.1.0 mv:B:c,5,1,0,0,0,1,0,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,1,0,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0,0,0,1,1,0,0,1,0,1,0,0,1,0,1,0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,1,0,1,1,0,1,0,1,1,1,1,0,1,0,1,1,1,0,0,1,1,0,0,0,0,1,0,1,0,1,0,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,1,1,0,0,1,0,1,1,0,1,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,0,1,0,1,1,0,1,0,1,0,1,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,1,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1
Based on the commit, the move table is attached to the mv
tag for each read, indicating an array of 8-bit signed integers (represented as comma-separated values in the SAM output). I'd guess (based on how the calling has worked in the past) that these represent strides comprising a fixed number of consecutive samples, so (as before) it'll need correction to convert the stride width to variable width events.
For the model I'm using here, my guess from the model toml file is that the stride width is 5:
$ grep -B 8 stride ~/install/dorado/dorado-0.2.1-linux-x64/[email protected]/config.toml
[encoder]
type = "serial"
[[encoder.sublayers]]
type = "convolution"
insize = 1
size = 16
bias = true
winlen = 5
stride = 1
--
max = 3.5
[[encoder.sublayers]]
type = "convolution"
insize = 16
size = 16
bias = true
winlen = 5
stride = 1
--
max = 3.5
[[encoder.sublayers]]
type = "convolution"
insize = 16
size = 1024
bias = true
winlen = 19
stride = 5
```