Most efficient way to store a big DNA sequence?

前端 未结 7 1162
滥情空心
滥情空心 2021-02-04 11:58

I want to pack a giant DNA sequence with an iOS app (about 3,000,000,000 base pairs). Each base pair can have a value A, C, T or G

相关标签:
7条回答
  • 2021-02-04 12:53

    consider this, how many different combinations can you get? out of 4 (i think its about 16 )

    actg = 1 atcg = 2 atgc = 3 and so on, so that

    you can create an array like [1,2,3] then you can go one step further,

    check if 1 is follow by 2, convert 12 to a, 13 = b and so on... if I understand DNA a bit it means that you cannot get a certain value

    as a must be match with c, and t with g or something like that which reduces your options, so basically you can look for a sequence and give it a something you can also convert back...

    0 讨论(0)
提交回复
热议问题