mortazavilab / lapa

Alternative polyadenylation detection from diverse data sources such as 3'-seq, long-read and short-reads.
https://www.biorxiv.org/content/10.1101/2022.11.08.515683v1
25 stars 13 forks source link

Fix sorted-nearest version 0.0.33 #8

Closed peterthorpe5 closed 2 years ago

peterthorpe5 commented 2 years ago

Dear Lapa,

FIX: this is a fix for all the blah below:

mamba install -c bioconda pyranges (it seems the pip version of pyranges does not have all that is required).

I have installed lap via pip install lapa (but I have to also do pip install cython). I have this in a conda environment running python 3.8.

If I run:

$ lapa Traceback (most recent call last): File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/bin/lapa", line 5, in from lapa.main import cli File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/lapa/init.py", line 1, in from lapa.main import lapa File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/lapa/main.py", line 2, in from lapa.lapa import lapa File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/lapa/lapa.py", line 3, in import pyranges as pr File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/pyranges/init.py", line 137, in import pyranges.genomicfeatures as gf File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/pyranges/genomicfeatures.py", line 7, in from sorted_nearest.src.introns import find_introns File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/sorted_nearest/init.py", line 7, in from sorted_nearest.src.k_nearest_ties import get_all_ties, get_different_ties ImportError: cannot import name 'get_all_ties' from 'sorted_nearest.src.k_nearest_ties' (/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/sorted_nearest/src/k_nearest_ties.cpython-38-x86_64-linux-gnu.so)

Then if I force it to use python3.8 with a lapa.py version from github: I get the same error.

$ python3.8 "/mnt/shared/scratch/pthorpe/private/mustafa/lapa/lapa/lapa/lapa.py" Traceback (most recent call last): File "/mnt/shared/scratch/pthorpe/private/mustafa/lapa/lapa/lapa/lapa.py", line 3, in import pyranges as pr File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/pyranges/init.py", line 137, in import pyranges.genomicfeatures as gf File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/pyranges/genomicfeatures.py", line 7, in from sorted_nearest.src.introns import find_introns File "/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/sorted_nearest/init.py", line 7, in from sorted_nearest.src.k_nearest_ties import get_all_ties, get_different_ties ImportError: cannot import name 'get_all_ties' from 'sorted_nearest.src.k_nearest_ties' (/mnt/shared/scratch/pthorpe/apps/conda/envs/python38/lib/python3.8/site-packages/sorted_nearest/src/k_nearest_ties.cpython-38-x86_64-linux-gnu.so)

If I then run pip install pyranges. It says it is already satisfied ..

MuhammedHasan commented 2 years ago

Thanks for reporting the issue. One of the dependencies of dependency on our package is broken. I will fix the version of the dependency and release a new version.

MuhammedHasan commented 2 years ago

pip install sorted-nearest=0.0.33 resolves the issue see: https://github.com/pyranges/sorted_nearest/issues/5