ChaissonLab / danbing-tk

Toolkit for VNTR genotyping and repeat-pan genome graph construction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kmer decode

BrendaLee1 opened this issue · comments

Hi
Thanks for this excellent tool, I tried to use this software to build graph for our VNTRs. After I got pan.tr.kmers and pan.graph.kmers, I find that kmers were coded into numbers. How can I decode kmers into DNA seqence, do you have any suggestion?

Best Wishes,
Lee

Hi Lee,

Thanks for bringing up the question. Each nucleotide is encoded with 2 bits, A/C/G/T=0/1/2/3. Each additional nucleotide will shift the encoded value by two bits, e.g. T = 3, TA = 3*2^2 + 0 = 12, TAA = 3*2^4 + 0*2^2 + 0 = 48.

Hope this helps.
-Tony