Closed Parvfect closed 10 months ago
Take some time and think about it and do it. Here we go.
DONE!! Code is shit and needs to be verified but look at this
The Threshold is around 4 and our decoder performs so much better than BEC! We are onto the finish line boys
Double check this method
def get_possible_symbols(reads, symbols, motifs, n_picks):
reads = [set(i) for i in reads]
symbol_possibilities = []
for i in reads:
# Will only work for the Coupon Collector Channel
motifs_encountered = i
motifs_not_encountered = set(motifs) - set(motifs_encountered)
read_symbol_possibilities = []
if len(motifs_encountered) == n_picks:
read_symbol_possibilities = [get_symbol_index(symbols, motifs_encountered)]
else:
# The symbol possibilites are the motifs that are encountered in combination with the motifs that are not encountered
remaining_motif_combinations = [set(i) for i in combinations(motifs_not_encountered, n_picks - len(motifs_encountered))]
for i in remaining_motif_combinations:
possibe_motifs = motifs_encountered.union(i)
symbols = [set(i) for i in symbols]
if possibe_motifs in symbols:
read_symbol_possibilities.append(get_symbol_index(symbols, motifs_encountered.union(i)))
symbol_possibilities.append(read_symbol_possibilities)
return symbol_possibilities
This will only work for the Coupon Collector Channel, will need to be changed for the Distracted CC case
Closing the Issue, going to make further changes in code optimization and generalization
Not sure why this line of code is where it is, seems to be done every time for no reason:
symbols = [set(i) for i in symbols]
Otherwise looks correct
All possible symbols compatible with motifs that are encountered - not at a symbol level