Parvfect / HelixWorks

Code for the Channels and Decoding Methods
0 stars 1 forks source link

Optimize Permuter for small Reads #19

Closed Parvfect closed 1 year ago

Parvfect commented 1 year ago

Currently biggest bottleneck in the pipeline - needs fixing

Parvfect commented 1 year ago

Looks like Permuter is wrong according to Roman

image
Parvfect commented 1 year ago

Need a fresh perspective - leaving for training - will do this later

Parvfect commented 1 year ago

Fixed the method now based on growing partial sum. Actually gotta read for smaller reads, however iterations are really really small. Current code looks like this, needs to be optimized.

def permuter1(arr, ffield):

    possibilities = set(arr[0])
    new_possibilities = set()
    counter = 1
    for i in range(1, len(arr)):
        for k in possibilities:
            for j in arr[i]:
                new_possibilities.add(j+k)
        possibilities = new_possibilities 
        new_possibilities = set()

    return set([-(i %ffield) %ffield for i in possibilities])
Parvfect commented 1 year ago

image

Parvfect commented 1 year ago

Works for small Reads, but still disgustingly slow, since the number of possibilites explode. Would love to somehow make it faster. If I can, I'll do it. If not, well - we have to let it go. It does work now.

Parvfect commented 1 year ago

Done