jbkinney / mavenn

MAVE-NN: genotype-phenotype maps from multiplex assays of variant effect
MIT License
24 stars 5 forks source link

Interpretable dataframe for theta_lclc #35

Open sofeasible opened 1 year ago

sofeasible commented 1 year ago

Hi, would it be possible to output the pairwise thetas (theta_lclc) in a dictionary or pandas dataframe? Thank you!

jbkinney commented 1 year ago

I haven't tested this, but this or something close should convert from the numpy array theta_lclc to a dict theta_lclc_dict:

theta_lclc_dict = []
    for l in range(L):
        for m in range(C):
        for k in range(i,L):
            for n in range(C):
            c = alphabet[n]
            d = alphabet[m]
            var_name = f'theta_{l}{c}{k}{d}'
            theta_lclc_dict[var_name] = theta_lclc[l,m,k,n]
sofeasible commented 1 year ago

Thanks, that works!