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

pysam.cfaidx.FastqProxy has the wrong size, try recompiling #45

Open
pontikos opened this issue Sep 21, 2015 · 12 comments
Open

pysam.cfaidx.FastqProxy has the wrong size, try recompiling #45

pontikos opened this issue Sep 21, 2015 · 12 comments

Comments

@pontikos
Copy link

Hello I've cloned the git repo on my local machine and I'm this is the warning when I attempt to install pysamstats:

[rmhanpo@pchuckle:~/pysamstats$] python setup.py install --user
running install
running build
running build_ext
building 'pysamstats' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE= -I/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam -I/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam/include/htslib -I/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam/include/samtools -I/share/apps/python-2.7.3-static/include/python2.7 -c pysamstats.c -o build/temp.linux-x86_64-2.7/pysamstats.o
In file included from pysamstats.c:275:
/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam/htslib_util.h:12: warning: function declaration isn't a prototype
/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam/pysam_stream.h:8: warning: 'kseq_init' defined but not used
/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam/pysam_stream.h:8: warning: 'kseq_destroy' defined but not used
/home/rmhanpo/.local/lib/python2.7/site-packages/pysam-0.8.4rc0-py2.7-linux-x86_64.egg/pysam/pysam_stream.h:8: warning: 'kseq_read' defined but not used
pysamstats.c: In function '__Pyx_WriteUnraisable':
pysamstats.c:53179: warning: 'state' may be used uninitialized in this function
creating build/lib.linux-x86_64-2.7
gcc -pthread -shared build/temp.linux-x86_64-2.7/pysamstats.o -o build/lib.linux-x86_64-2.7/pysamstats.so
running build_scripts
creating build/scripts-2.7
copying and adjusting scripts/pysamstats -> build/scripts-2.7
changing mode of build/scripts-2.7/pysamstats from 664 to 775
running install_lib
copying build/lib.linux-x86_64-2.7/pysamstats.so -> /home/rmhanpo/.local/lib/python2.7/site-packages
running install_scripts
copying build/scripts-2.7/pysamstats -> /home/rmhanpo/.local/bin
changing mode of /home/rmhanpo/.local/bin/pysamstats to 775
running install_egg_info
removing '/home/rmhanpo/.local/lib/python2.7/site-packages/pysamstats-0.23-py2.7.egg-info' (and everything under it)
Writing /home/rmhanpo/.local/lib/python2.7/site-packages/pysamstats-0.23-py2.7.egg-info

Later when I try to import the package I get this error:

>>> import pysamstats
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "cfaidx.pxd", line 21, in init pysamstats (pysamstats.c:48718)
ValueError: pysam.cfaidx.FastqProxy has the wrong size, try recompiling
@alimanfoo
Copy link
Owner

Hi Nikolas, I haven't seen specifically this error before, but I think things like this can happen if there are multiple version of pysam installed on a computer, and there is any inconsistency between the version of pysam that pysamstats was built against and the version of pysam that is installed when you run a particular python interpreter.

The only thing I can suggest is to try installing into a virtual environment. Start with a clean virtual environment, upgrade pip and setuptools to ensure you have the latest, then install cython, numpy, pysam and pysamstats, all via pip. If that still doesn't work, let me know.

Hth.

@luwening
Copy link

Same error confirmed, python 2.7, new virtual env, and pip install or install from source

@alimanfoo
Copy link
Owner

Thanks, looking into it.

@pontikos
Copy link
Author

pontikos commented Dec 1, 2015

If I remember correctly I think this happened because I was in the ~/pysamstats directory.

@alimanfoo
Copy link
Owner

Thanks @pontikos but may be a different problem (with same error message), looks like pysam 0.8.4 moved a couple of things, am just testing a new pysamstats release which should fix.

@alimanfoo
Copy link
Owner

Hi @luwening, I've released a new version 0.24.0 which should be compatible with pysam 0.8.4. Could you make sure you have pysam 0.8.4 installed, then try installing pysamstats? Thanks.

@kwgsmith
Copy link

I'm having the same issues with the latest version of both pysam (0.9.0) and pysamstats (0.24.2). It's not really possible for me to reinstall everything but I have the latest version of cython and numpy as well. Any idea why it would be doing this?

@alimanfoo
Copy link
Owner

Hi there, I have not checked compatibility with pysam 0.9.0 yet, apologies.
For now if you want to use pysamstats you'll have to install against pysam
0.8.4.

On Wednesday, 23 March 2016, Kenneth Smith <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I'm having the same issues with the latest version of both pysam (0.9.0)
and pysamstats (0.24.2). It's not really possible for me to reinstall
everything but I have the latest version of cython and numpy as well. Any
idea why it would be doing this?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#45 (comment)

Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email: alimanfoo@googlemail.com alimanfoo@gmail.com
Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721

@astewart-twist
Copy link

@alimanfoo Any idea of when pysamstats will support more recent pysam versions?

@alimanfoo
Copy link
Owner

Apologies, I'm absolutely snowed under at the moment. It's good to know you
need it, I'll try and grab some spare time, but probably won't be for a
couple of weeks.

On Wednesday, May 11, 2016, astewart-twist notifications@github.com wrote:

@alimanfoo https://github.com/alimanfoo Any idea of when pysamstats
will support more recent pysam versions?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#45 (comment)

Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health http://cggh.org
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email: alimanfoo@googlemail.com alimanfoo@gmail.com
Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721

@astewart-twist
Copy link

I was just asking out of curiosity @alimanfoo. I'm more curious to see how any pileup computation changes between samtools 2 and 3 would affect pysamtools calculations.

I'd be happy to test out compatibility in the meantime. Is it fairly straight forward to force pysamtools to use pysam > 0.8.4 (or samtools > 2 directly) ?

@alimanfoo
Copy link
Owner

You could try compiling pysamstats current master against pysam latest release, you would just need to set up a virtual environment where the new pysam is installed, then clone pysamstats repo and build:

$ git clone git://github.com/alimanfoo/pysamstats.git
$ cd pysamstats
$ python cythonize.py  # required if making any changes to pysamstats.pyx
$ python setup.py build_ext --inplace
$ nosetests -v  # run test suite

I don't know if or how the pysam cython API has changed since 0.8.4 so you will probably get compile errors. If it's not obvious how to resolve them then feel free to drop the error logs here, I'd be happy to help diagnose.

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