Rocklin-Lab / cdna-display-proteolysis-pipeline

21 stars 5 forks source link

Bug in STEP4_module.ipynb #4

Closed godotgildor closed 1 year ago

godotgildor commented 1 year ago

In the STEP4_module.ipynb I believe there is a bug when calculating sum_saturated_sites. The current code reads:

sum_saturated_sites = jax.numpy.transpose(jax.numpy.resize(saturated_sites,(bin_num,len(saturated_sites),2)),(1,2,0))

But note that there is no sum across the saturated sites. The result is that when resizing the sum_saturated_sites array, the resulting array has an awkward wrapping of the raw site scores starting with scramble one and then continuing into subsequence scrambles. I believe instead the code should read:

sum_saturated_sites = jax.numpy.transpose(jax.numpy.resize(jax.numpy.sum(saturated_sites, axis=2),(bin_num,len(saturated_sites),2)),(1,2,0))

Now, in the STEP4_run.ipynb notebook, the call is not made to the STEP4_module but instead a DataS23_STEP4_module - perhaps that module has a different implementation? If so, is that module available?

Thanks for your help - and great job on the paper.

grocklin commented 1 year ago

Thanks for bringing this to our attention - should be fixed by the latest update

KotaroTsuboyama commented 1 year ago

Thanks for letting us know the bugs. The points you pointed out should be fixed now.