Protein sequence of breakpoint within 5'UTR in the second partner gene is still buggy [Fix attached]
This is pertaining to the Python version of AGFusion (latest version, installed from pip).
This bug was described years ago here: https://github.com/murphycj/agfusionweb-react/issues/4
The web app bugfix worked, but the correct behavior was not recapitulated in the Python version. Initially I thought the author has not gotten around to fixing this in the Python version, but a closer look into the only script this behavior depends on, reveals that a fix has been incorporated, but it was not thoroughly tested (there is a simple syntax error that goes unnoticed by Python somehow).
Below is the patched version of model.py.
If you are having the same issue and wants a quick fix, you can use this patched model.py script as a drop-in simply by following these steps:
-
Copy and paste the patched
model.pyscript below into a new file using your favourite text editor and save it asmodel.pyprecisely (or download it as model.py using the link above) -
Find where the installed package of AGFusion is located in your machine by running:
python -c "import agfusion; import os; print(os.path.dirname(agfusion.__file__))"
This returns a path to the directory where model.py should be located. For example, the path to agfusion of my machine is /opt/conda/lib/python3.12/site-packages/agfusion.
- Change directory (
cd) into this directory, renamemodel.pyto back the unpatched version up
cd /opt/conda/lib/python3.12/site-packages/agfusion && cp model.py model.py.backup
- Now mv the patched version of
model.pyyou saved/downloaded to this location. For example, if you downloaded it to your Downloads folder, then do this:
mv ~/Downloads/model.py ./
Now you can rerun AGFusion and AGFusion should run with the correct behaviour. As the edit I made is purely syntactic, this should be very safe. I am not creating a pull request because the author is no longer maintaining this repo.