Thopic / righor-py

Python/Rust package & specialized functions associated with righor
0 stars 0 forks source link

vj model segments cannot be updated #7

Open zacmon opened 2 months ago

zacmon commented 2 months ago

The v_segments attribute can be set for VDJ models.

import righor as rg

model = rg.load_model("human", "trb")
model.v_segments = model.v_segments

The v_segments attribute cannot be set for VJ models.

import righor as rg

model = rg.load_model("human", "tra")
model.v_segments = model.v_segments

This gives a RuntimeError

RuntimeError: Array contains non-positive or non-finite values
Thopic commented 1 month ago

I updated the righor version (0.2.4), this should fix it (for posterity, when loading a vj model I accidentally introduced NaN in P(V, J) if P(V) was 0, not an issue for most stuff except when you start to normalize). Still hope to finish the new version in a not-too-far-off future.

Tell me if this fixes it! (the version change on pip & crates.io is a bit of a mess)