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

clipper displays unusual help messages and can't be used #103

Open
kerenzhou062 opened this issue Feb 8, 2022 · 9 comments
Open

clipper displays unusual help messages and can't be used #103

kerenzhou062 opened this issue Feb 8, 2022 · 9 comments

Comments

@kerenzhou062
Copy link

After installing clipper, I got the help message from clipper -h bellow:

Usage is  [options]
file_in is a file with a list of the length of aligned reads (only the part that aligns)
Options
 -L <int>   Effective Gene Length
 -r <int>   # of iterations
 -f <int>   input file containing read lengths
 -a <float>   B-H FDR cutoff, default(.05) ... gets very slow as alpha gets smaller
 -T 1/0 default(0) print running time statistics
Output:
Significance Threshold [tab] Iterations with this observed threshold

I also noticed that when installing with setup.py, there's warnings from peaksmodule.cc. That may caused the bug.

cythoning clipper/src/readsToWiggle.pyx to clipper/src/readsToWiggle.c
/home/user/.conda/envs/clipper3/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /net/isi-dcnl/ifs/user_data/JJChen_Grp/zhoukr/home/software/clipper/clipper/src/readsToWiggle.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
building 'clipper.src.readsToWiggle' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/clipper
creating build/temp.linux-x86_64-3.7/clipper/src
gcc -pthread -B /home/user/.conda/envs/clipper3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user/.conda/envs/clipper3/include/python3.7m -c clipper/src/readsToWiggle.c -o build/temp.linux-x86_64-3.7/clipper/src/readsToWiggle.o
gcc -pthread -shared -B /home/user/.conda/envs/clipper3/compiler_compat -L/home/user/.conda/envs/clipper3/lib -Wl,-rpath=/home/user/.conda/envs/clipper3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/clipper/src/readsToWiggle.o -o build/lib.linux-x86_64-3.7/clipper/src/readsToWiggle.cpython-37m-x86_64-linux-gnu.so
building 'clipper.src.peaks' extension
gcc -pthread -B /home/user/.conda/envs/clipper3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user/.conda/envs/clipper3/include/python3.7m -c clipper/src/peaksmodule.cc -o build/temp.linux-x86_64-3.7/clipper/src/peaksmodule.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
clipper/src/peaksmodule.cc: In function ‘PyObject* peaks_readsToWiggle_pysam(PyObject*, PyObject*)’:
clipper/src/peaksmodule.cc:332:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  332 |   while (item = PyIter_Next(iterator)) {
      |          ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
clipper/src/peaksmodule.cc: In function ‘PyObject* PyInit_peaks()’:
clipper/src/peaksmodule.cc:513:1: warning: no return statement in function returning non-void [-Wreturn-type]
  513 | }
      | ^
g++ -pthread -shared -B /home/user/.conda/envs/clipper3/compiler_compat -L/home/user/.conda/envs/clipper3/lib -Wl,-rpath=/home/user/.conda/envs/clipper3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/clipper/src/peaksmodule.o -o build/lib.linux-x86_64-3.7/clipper/src/peaks.cpython-37m-x86_64-linux-gnu.so
@kerenzhou062 kerenzhou062 changed the title clipper -h display unusual help messages and can't be used clipper displays unusual help messages and can't be used Feb 8, 2022
@ReutFluss
Copy link

I have the same issue! Can't use clipper. Any solution for that?

@kerenzhou062
Copy link
Author

kerenzhou062 commented Feb 9, 2022

I have the same issue! Can't use clipper. Any solution for that?

I used clipper v1.3 instead of the latest version. It seems that the peaksmodule.cc module is available with python2 only.

@byee4
Copy link
Member

byee4 commented Feb 9, 2022

I ended up making a docker image for CLIPper, since the student who developed this left years ago. I'm not sure if I'm able to reproduce these problems, so hopefully this helps:

docker pull brianyee/clipper:61d5456

@kerenzhou062
Copy link
Author

I ended up making a docker image for CLIPper, since the student who developed this left years ago. I'm not sure if I'm able to reproduce these problems, so hopefully this helps:

docker pull brianyee/clipper:61d5456

Unfortunately, our slurm cluster did not support docker.

@byee4
Copy link
Member

byee4 commented Feb 11, 2022 via email

@y9c
Copy link

y9c commented Mar 6, 2022

This is because peaksmodule.cc is not complied correctly, The easiest solution is to compile this c code by yourself and replace the one within the package path.

You are using the python3.7 in a conda env, so you can compile the code by:

g++ -fPIC -shared -O3 -Wall -I/home/user/.conda/include/python3.7 -o peaks.cpython-37m-x86_64-linux-gnu.so peaksmodule.cc

Then check the path of clipper package, and move the peaks.cpython-37m-x86_64-linux-gnu.so into this path.

python -c "import clipper;print(clipper.__file__)"

The warning message is not relative to this problem, but it can be fixed by this patch: #104


Relative issues that can also fix in this way:
#82 #101

@yuanjianwen-gif
Copy link

I got the same error. Could you clarify the “path of clipper package”? Thanks for your time!

This is because peaksmodule.cc is not complied correctly, The easiest solution is to compile this c code by yourself and replace the one within the package path.

You are using the python3.7 in a conda env, so you can compile the code by:

g++ -fPIC -shared -O3 -Wall -I/home/user/.conda/include/python3.7 -o peaks.cpython-37m-x86_64-linux-gnu.so peaksmodule.cc

Then check the path of clipper package, and move the peaks.cpython-37m-x86_64-linux-gnu.so into this path.

python -c "import clipper;print(clipper.__file__)"

The warning message is not relative to this problem, but it can be fixed by this patch: #104

Relative issues that can also fix in this way: #82 #101

@y9c
Copy link

y9c commented Apr 19, 2023

run python -c "import clipper;print(clipper.__file__)" in the command line to find out.

@yuanjianwen-gif
Copy link

Thanks for the reply, but unfortunately I still failed to install it. I gave it up after a long time trying.

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

5 participants