Generate Max Number of DNA Sequences separated by a given Hamming distance
1
0
Entering edit mode
8 weeks ago
rtrende ▴ 80

I would like to make a pool of 7nt DNA sequences that are all separated from one another by a Hamming distance of 3. Is there a way to generate a list with the maximum number of such sequences? I have written algorithms to do this with an element of randomness (e.g. iteratively generate sequences and add them to a list if they are at least 3nts away from all other sequences in a list), but the number of sequences I get with this approach is variable, so I would like a way of analytically computing a list of sequences so I can "fit" as many sequences as possible in my list

Update 7/31/24:

I believe the best way to do this is that this article https://link.springer.com/article/10.1023/A:1011275112159 describes a way to generate 8192 9-letter quaternary sequences. With this list, I could:

  1. Identify at least 8192/4=2048 sequences whose nth letter match

  2. Select these sequences and trim the nth letter. Because they were all separated by a Hamming distance of 3 and the only letter I trimmed was identical in all sequences, this will yield 2048 8-letter sequences

  3. Repeat to trim to 512 7-letter sequences

However, I do not really understand how the above article generated 8192 9-letter sequences, and an algorithm they use (wclique) is, as far as I can tell, not readily available to download. Any guidance from someone more mathematically literate than I on how to implement the algorithm described in the article above to generate 8192 9-letter sequences would be much appreciated!

hamming-distance Barcode variants DNA • 671 views
ADD COMMENT
0
Entering edit mode

rtrende, hmm seems like you should either end up with exactly 4 or exactly 9 oligos in your list, depending on the seed oligo you provide, no?

ADD REPLY
1
Entering edit mode

oh. sorry. you said at least three. the first sentence of your post says by a distance of 3, it made me think you were interested in the exact case. What did you get as your max? im getting around 315 or so.

heres one i got 310

310 GGCCACT,TGATGGC,CTAGTGT,TTCGCTT,TTAATTC,ACTTAAT,ATTGTGG,CGGAGTA,GAACGCG,ATCATAT,CTGCACA,CCGGTTA,TCGGGAC,TTTAGAA,GGTCGCC,ACATCTG,CAATAAA,ACCGACA,CTAAGCC,ACGTTCT,GAGTGTT,CCCAAGA,GCAAGTA,TTAGAAG,TTCTCGG,TCTCAGT,CGCACCG,AGACTTA,AGGAACT,CATCTTC,AATAGTT,GTGCTTG,ATGACCG,AAGACGT,TTATACA,TTGACAC,GTTGCTA,GCAATAC,ACGCGGA,CTTTGGA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also typically gotten high 200s to low 300s using code that randomly generates sequences and adds them to a list if they're >=3nts from all other sequences in the list

However, for my application, I would like as many sequences as possible. The best way I have found to estimate how many I could get is the Hamming bound (https://en.wikipedia.org/wiki/Hamming_bound), which implies I should be able to get <=744 sequences that are 7nt long separated by a Hamming distance of 3. This makes me think the random approach is inefficient, so I am wondering if there is some algorithm that efficiently fills sequence space to fit as many 7nt sequences separated by 3nts as possible

ADD REPLY
0
Entering edit mode

Following up on above, this link https://www.win.tue.nl/~aeb/codes/quaternary-1.html suggests that it should be possible to generate 512-596 7nt sequences separated by a Hamming distance of 3, suggesting that a smarter algorithm may be able to generate a lot more BC sequences than the random algorithms that we wrote. I just have no idea how to write such an algorithm haha and so would appreciate if anyone has guidance on this front

ADD REPLY
0
Entering edit mode

yeah thats the theoretical max but you wont approach it. after hundreds of billions of iterations you might get like 340. you could heuristically guide the sequence order to leave as much of the sequence space unpreturbed for as long as possible (rationally guided approach) but you are going to do that much better than the best brute force result

ADD REPLY
0
Entering edit mode

it may be possible. it is uncertain if it actually is.

ADD REPLY
1
Entering edit mode
11 days ago
rtrende ▴ 80

Managed to find an answer in some computer science literature of all places.

This paper describes a way of making a list of 8192 unique 9nt sequences all separated by a Hamming distance of 3 in Section 3.4. After generating all these sequences, you can select the 25% of sequences that match at the first nucleotide, remove the first nucleotide, and get a list of 8192/4 = 2048 unique 8nt sequences that are all still 3nt apart (because they were 3nt apart and you only removed a nucleotide where they all matched). Repeat this process again to get a list of 2048/4 = 512 7nt sequences that are all 3nt apart

ADD COMMENT

Login before adding your answer.

Traffic: 1057 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6