taiyaki
taiyaki copied to clipboard
question about 'flipflop_remap'
Hello, thank you very much for providing this useful tool. I just have a question when I read the code in https://github.com/nanoporetech/taiyaki/blob/9672c66d654ad8101c4faf481646493082e090c8/taiyaki/flipflop_remap.py#L123 Why K=2nbase(nbase+1)? and waht does T mean?
Hello. We only store the nonzero entries for the full (nbase + nbase)^2 transition matrix.
Every base has a "flip" and a "flop" state, so (nbase + nbase) states in all, but transitions to a flop state can only come from a same base (either flip or flop) so part of the full transition matrix is extremely sparse.
Full transition matrix, where F is the set of "flip" bases, f is the set of "flop" bases, A & B are full rank matrices, and D & E are diagonal matrices.
| F f
--+-----
F | A B
f | D E
As stored in Taiyaki, where '-' represents transition to the appropriate "flop" base, and d & e are the diagonal elements of the matrices D & E above.
| F f
--+-----
F | A B nbase x (nbase + nbase) elements
- | d e (nbase + nbase) elements
Hello. We only store the nonzero entries for the full (nbase + nbase)^2 transition matrix. Every base has a "flip" and a "flop" state, so (nbase + nbase) states in all, but transitions to a flop state can only come from a same base (either flip or flop) so part of the full transition matrix is extremely sparse.
Full transition matrix, where F is the set of "flip" bases, f is the set of "flop" bases, A & B are full rank matrices, and D & E are diagonal matrices.
| F f --+----- F | A B f | D E
As stored in Taiyaki, where '-' represents transition to the appropriate "flop" base, and d & e are the diagonal elements of the matrices D & E above.
| F f --+----- F | A B nbase x (nbase + nbase) elements - | d e (nbase + nbase) elements
It is very helpful to me. Thank you very much for your prompt reply.