Code Monkey home page Code Monkey logo

Comments (9)

endrebak avatar endrebak commented on June 26, 2024

Thanks for reporting. And trying pyranges :)

Can you report your system and versions with pr.version_info()?

Do you have some example data where it happens?

from pyranges.

mvolar avatar mvolar commented on June 26, 2024

Hi, the version output is:

{'pyranges version': '0.0.129', 'pandas version': '2.0.3', 'numpy version': '1.25.1', 'python version': sys.version_info(major=3, minor=11, micro=4, releaselevel='final', serial=0), 'ncls': '0.0.68', 'sorted_nearest': '0.0.39', 'pyrle': 'not installed', 'ray': 'not installed', 'bamread': 'not installed', 'pyranges_db': 'not installed', 'pybigwig': 'not installed', 'hypothesis': 'not installed'}

The system is Windows 10, using interactive jupyter notebook.

Example minimal data which creates an error on my PC:

data = {'Chromosome': ['chr1', 'chr1', 'chr1'],
        'Start': [1, 4, 10],
        'End': [5, 8, 15]}

df = pd.DataFrame(data)

df["Start"] = np.int64(df["Start"])
df["End"] = np.int64(df["End"])
pyranges_obj = pr.PyRanges(df,int64=True)

pyranges_obj.cluster()

from pyranges.

endrebak avatar endrebak commented on June 26, 2024

We have no way of testing on windows, unfortunately.

I want to write the algorithms in rust instead of cython which should take care of such problems.

But I cannot help you for now, unfortunately.

from pyranges.

mvolar avatar mvolar commented on June 26, 2024

Then you will probably do pandas-->polars transition for underlying dataframe manipulation? Or you would just write rust extensions using pyo3 to be used in similar fashion to cpython functions?

from pyranges.

marco-mariotti avatar marco-mariotti commented on June 26, 2024

Separate question: how are you running python in the first place? You can try WSL2 to run everything in a Linux like environment. Try a simple python interpreter at first. If this clears the error, you can Google how to run Jupiter from WSL2.
If you're already using WSL2... well, nevermind this comment

from pyranges.

endrebak avatar endrebak commented on June 26, 2024

There would be value in providing an alternative for Windows users.

I do not know why Windows does not treat/respect int64 like Linux/Mac does. I know that if you are unspecific about types int might interpret int or long differently, but it should not do so when one is being explicit.

from pyranges.

mvolar avatar mvolar commented on June 26, 2024

Separate question: how are you running python in the first place? You can try WSL2 to run everything in a Linux like environment. Try a simple python interpreter at first. If this clears the error, you can Google how to run Jupiter from WSL2. If you're already using WSL2... well, nevermind this comment

Sorry for the wlong reply, had to write a polars extension for solution, avoiding pandas/pyranges. When running this code in WSL2 seems to work so the problem is in the cython/windows interface and their respective integer treatment.

from pyranges.

marco-mariotti avatar marco-mariotti commented on June 26, 2024

Thanks mvolar. TL;DR for future readers: if you want pyranges in windows, use WSL2

from pyranges.

endrebak avatar endrebak commented on June 26, 2024

We should add this to the documentation! Thanks

from pyranges.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.