beliveau-lab / OligoMiner

Genome-scale design tool for oligo hybridization probes
MIT License
58 stars 19 forks source link

reformaTable function in blockParse.py #21

Closed jinlingwanggit closed 2 years ago

jinlingwanggit commented 2 years ago

The 'reformatTable' function will generate nearest neighbor table with reverse complementary base pairs. but line 122 code will over-ride line 123 result. I run the code with and wo line 122. Output is shown below. I think line122 should be removed. or maybe I misunderstood something.

120 for inter in table: 121 if inter[2] == '/': 122 newTable[inter[0:2]] = table[inter] 123 newTable[self.comps[inter[1]] + self.comps[inter[0]]] = \ table[inter]

with line 122. TT value was over-ridden.

ori table, {'init_5T/A': (0, 0), 'sym': (0, 0), 'AA/TT': (-11.5, -36.4), 'AC/TG': (-7.8, -21.6), 'TT/AA': (-7.8, -21.9)}

ori table basepair, AA/TT: (-11.5, -36.4) reverse complement, TT: (-11.5, -36.4) ori table basepair, TT/AA: (-7.8, -21.9) reverse complement, AA: (-7.8, -21.9)

newTable, {'init_5T/A': (0, 0), 'sym': (0, 0), 'AA': (-7.8, -21.9), 'TT': (-7.8, -21.9), 'AC': (-7.8, -21.6), 'GT': (-7.8, -21.6)}

with out line 122, TT values are correct

ori table, {'init_5T/A': (0, 0), 'sym': (0, 0), 'AA/TT': (-11.5, -36.4), 'AC/TG': (-7.8, -21.6), 'TT/AA': (-7.8, -21.9)}

ori table basepair, AA/TT: (-11.5, -36.4) reverse complement, TT: (-11.5, -36.4) ori table basepair, TT/AA: (-7.8, -21.9) reverse complement, AA: (-7.8, -21.9)

newTable, {'init_5T/A': (0, 0), 'sym': (0, 0), 'TT': (-11.5, -36.4), 'GT': (-7.8, -21.6), 'AA': (-7.8, -21.9)}

brianbeliveau commented 2 years ago

Hi,

The function in question here essentially just reformats the NN table information such that key changes from the standard Bio.SeqUitls.MeltingTemp format "AA/TT" to a pair of keys ("AA", "TT") that map to the same value.

It looks like you might be trying to pass an asymmetric table? We do not currently support asymmetric tables or wobble.