Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rmatspipeline/rmatspipeline.pyx: cannot find cimported module 'nogilbam' #312

Open
MSQ-123 opened this issue Aug 18, 2023 · 5 comments
Open

Comments

@MSQ-123
Copy link

MSQ-123 commented Aug 18, 2023

I run ./build_rmats to build the rmats, but it displayed these:

Warning: Extension name 'rmats.rmatspipeline' does not match fully qualified name 'rmatspipeline' of 'rmatspipeline/rmatspipeline.pyx'
rmatspipeline/rmatspipeline.pyx: cannot find cimported module 'nogilbam'
rmatspipeline/rmatspipeline.pyx: cannot find cimported module 'rmatspipeline_declarations'
Compiling rmatspipeline/rmatspipeline.pyx because it changed.
[1/1] Cythonizing rmatspipeline/rmatspipeline.pyx

Error compiling Cython file:

...
from libcpp.map cimport map as cmap
from libcpp.pair cimport pair
from libcpp.string cimport string
from libcpp.vector cimport vector
from libcpp.unordered_map cimport unordered_map
from libcpp.algorithm cimport sort, lower_bound
^

rmatspipeline/rmatspipeline_declarations.pxd:8:0: 'libcpp/algorithm/lower_bound.pxd' not found

Error compiling Cython file:

...
else:
tran.second = -1
candidates[leftanchor[j]].push_back(tran)
exon.first = -leftanchor[j].right
exon.second = deref(ctx).second.exons[i].second
iexon = lower_bound(gene.idx_exon.begin(), gene.idx_exon.end(), exon)
^
could you please help me with this? thank you! @EricKutschera

@EricKutschera
Copy link
Contributor

It looks like the main error is for this line: https://github.com/Xinglab/rmats-turbo/blob/master/rMATS_pipeline/rmatspipeline/rmatspipeline_declarations.pxd#L8
rmatspipeline/rmatspipeline_declarations.pxd:8:0: 'libcpp/algorithm/lower_bound.pxd' not found

That error seems related to the error above: cannot find cimported module 'rmatspipeline_declarations'

Here is the definition of lower_bound in the cython libraries: https://github.com/cython/cython/blob/master/Cython/Includes/libcpp/algorithm.pxd#L215

I'm not sure why Cython is looking for libcpp/algorithm/lower_bound.pxd when the definition is in libcpp/algorithm.pxd

What version of Cython are you using? I've tested recently with Cython v0.29.36. I was also able to use Cython v3.0.0 after the change in this comment: #304 (comment)

@MSQ-123
Copy link
Author

MSQ-123 commented Aug 19, 2023

@EricKutschera My Cython is 0.25.2, maybe I need to update it?
I have also tried rmats pre-built version, but it called memory error:

Traceback (most recent call last):
File "./rMATS.4.0.1/rMATS-turbo-Linux-UCS4/rmats.py", line 308, in
main()
File "./rMATS.4.0.1/rMATS-turbo-Linux-UCS4/rmats.py", line 283, in main
run_pipe(args)
File "rmatspipeline/rmatspipeline.pyx", line 2547, in rmatspipeline.run_pipe (rmatspipeline/rmatspipeline.cpp:24961)
MemoryError

@EricKutschera
Copy link
Contributor

I tried building with Cython 0.25.2 and got similar errors to what you posted above. Then I upgraded to Cython 0.26.1 and was able to build successfully

The MemoryError is from rMATS v4.0.1 which is an older version. You could try installing v4.1.2 from conda: https://anaconda.org/bioconda/rmats
#304 (comment)

@MSQ-123
Copy link
Author

MSQ-123 commented Aug 31, 2023

I tried building with Cython 0.25.2 and got similar errors to what you posted above. Then I upgraded to Cython 0.26.1 and was able to build successfully

The MemoryError is from rMATS v4.0.1 which is an older version. You could try installing v4.1.2 from conda: https://anaconda.org/bioconda/rmats #304 (comment)

@EricKutschera I still can not build v4.1.2 on mac M1, could you please release a pre-build version? the error I encountered:
clang: error: unsupported option '-fopenmp'
Thanks a lot!

@EricKutschera
Copy link
Contributor

Here's a post that includes the error for unsupported option -fopenmp: https://groups.google.com/g/rmats-user-group/c/m44b0hAL6Kw/m/e2b7TOEhBAAJ

The solution was to use gcc by setting the CXX and CC environment variables

rMATS builds are available from bioconda: https://anaconda.org/bioconda/rmats
But bioconda doesn't support mac M1 yet: bioconda/bioconda-utils#706

You could try using a docker image: https://hub.docker.com/r/xinglab/rmats
Or running a linux virtual machine on your mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants