Hi there,
I have installed python2.7.11 and CrossMap-0.2.2 but couldn't get it to run. The error message I got is
$ python2.7 bin/CrossMap.py
Traceback (most recent call last):
File "bin/CrossMap.py", line 21, in <module>
from bx.bbi.bigwig_file import BigWigFile
ImportError: No module named bigwig_file</module>
I have set PYTHONPATH=/nfs/1000g-work/G1K/work/bin/pyenv/versions/2.7.11/lib/python2.7/site-packages/
and
PATH=/nfs/1000g-work/G1K/work/bin/pyenv/versions/2.7.11/bin
The CrossMap-0.2.2-py2.7-linux-x86_64.egg/bx/bbi directory only has bigwig_tests:
$ ls -l /nfs/1000g-work/G1K/work/bin/pyenv/versions/2.7.11/lib/python2.7/site-packages/CrossMap-0.2.2-py2.7-linux-x86_64.egg/bx/bbi
total 102
-rw-rw-r-- 1 zheng g1k 3467 Feb 4 16:41 bigwig_tests.py
-rw-rw-r-- 1 zheng g1k 4817 Feb 4 16:41 bigwig_tests.pyc
-rw-rw-r-- 1 zheng g1k 83 Feb 4 16:41 init.py
-rw-rw-r-- 1 zheng g1k 321 Feb 4 16:41 init.pyc
But the CrosMap-0.2.2/lib/bx/bbi does have bigwig_file:
$ ls -l /nfs/1000g-work/G1K/work/bin/CrossMap-0.2.2/lib/bx/bbi
total 3316
-rwxr-xr-- 1 zheng g1k 603658 Oct 31 2011 bbi_file.c
-rwxr-xr-- 1 zheng g1k 554 Oct 31 2011 bbi_file.h
-rwxr-xr-- 1 zheng g1k 16323 Oct 31 2011 bbi_file.pyx
-rwxr-xr-- 1 zheng g1k 317277 Oct 31 2011 bigbed_file.c
-rwxr-xr-- 1 zheng g1k 4516 Oct 30 2011 bigbed_file.pyx
-rwxr-xr-- 1 zheng g1k 374208 Oct 31 2011 bigwig_file.c
-rwxr-xr-- 1 zheng g1k 6071 Mar 24 2011 bigwig_file.pyx
-rwxr-xr-- 1 zheng g1k 3467 Mar 24 2011 bigwig_tests.py
-rwxr-xr-- 1 zheng g1k 106941 Oct 31 2011 bpt_file.c
-rwxr-xr-- 1 zheng g1k 2599 Mar 24 2011 bpt_file.pyx
-rwxr-xr-- 1 zheng g1k 165599 Oct 31 2011 cirtree_file.c
-rwxr-xr-- 1 zheng g1k 4495 Mar 24 2011 cirtree_file.pyx
-rwxr-xr-- 1 zheng g1k 83 Mar 24 2011 init.py
Any idea how to fix this? I put /nfs/1000g-work/G1K/work/bin/CrossMap-0.2.2/lib/bx/bbi in PYTHONPATH, didn't fix the issue.
Thanks!
Holly
This error is related to the bx-python package (https://pypi.python.org/pypi/bx-python/0.7.3 ). Normally, Crossmap will automatically install this package for you, if this process doesn’t work, you could install bx-python by yourself following the instructions.
Please let me know if this fix the problem.
PS: Ensembl and Illumina BaseSpace have online version of CrossMap if you want to lift over your files online:
http://www.ensembl.org/Homo_sapiens/Tools/AssemblyConverter
http://www.illumina.com/informatics/research/sequencing-data-analysis-management/basespace.html
Liguo
Last edit: Liguo Wang 2016-02-04
Thanks Liguo!
I downloaded bx-python and installed it to
/nfs/1000g-work/G1K/work/bin/pyenv/versions/2.7.11/lib/python2.7/site-packages/bx_python-0.7.3-py2.7-linux-x86_64.egg
I used:
$ python2.7 setup.py install
Do I have to add paths of bx-python to PYTHONPATH?
My CrossMap.py still cannot find module named bigwig_file
Best.
Holly
On 4 Feb 2016, at 18:04, Liguo Wang wrote:
Related
Tickets: #1
Hi Liguo,
Looks like the installation of bx-python still didn't install module bigwig_file in bx/bbi of bx-python...egg or the CrossMap....egg:
$ ls -l pyenv/versions/2.7.11/lib/python2.7/site-packages/bx_python-0.7.3-py2.7-linux-x86_64.egg/bx/bbi
total 102
-rw-rw-r-- 1 zheng g1k 3467 Feb 4 19:30 bigwig_tests.py
-rw-rw-r-- 1 zheng g1k 4826 Feb 4 19:30 bigwig_tests.pyc
-rw-rw-r-- 1 zheng g1k 83 Feb 4 19:30 init.py
-rw-rw-r-- 1 zheng g1k 322 Feb 4 19:30 init.pyc
$ ls -l /nfs/1000g-work/G1K/work/bin/pyenv/versions/2.7.11/lib/python2.7/site-packages/CrossMap-0.2.2-py2.7-linux-x86_64.egg/bx/bbi
total 102
-rw-rw-r-- 1 zheng g1k 3467 Feb 4 16:41 bigwig_tests.py
-rw-rw-r-- 1 zheng g1k 4817 Feb 4 16:41 bigwig_tests.pyc
-rw-rw-r-- 1 zheng g1k 83 Feb 4 16:41 init.py
-rw-rw-r-- 1 zheng g1k 321 Feb 5 16:40 init.pyc
Any idea what might have gone wrong during installation? Thanks.
you need to install bx-python 0.7.1, CrossMap is not compatible with versions 0.7.2 or 0.7.3.
I'm having the same issue.
Can someone fix the requirements in the wheel package ?
I have the same issue also.
I tried uninstalling bx-python 0.7.3 and installing bx-python 0.7.1, but this had no effect.
Did you solve it in the end Matheus or Holly?
Thanks,
R
I also have the same issue
Is there any solution right now?
Thanks
JW
I had the same issue when I did not install numpy in advance. I think the root cause is bx-python will skip compilation of bigwig_file module when numpy is absent.
This is how I solve the issue in fresh docker:14.04 environment:
$ apt-get update
$ apt-get install -y python-dev libbz2-dev liblzma-dev python-pip zlib1g-dev
$ pip install Cython --install-option="--no-cython-compile" pysam numpy CrossMap
$ python /usr/local/bin/CrossMap.py
Last edit: yun-lung li 2017-06-02
I can't install it by none of the methods described above, so I solved this issue by installing CrossMap with pip and an additional copy/paste of bbi directory from another repository. First of all I install normally:
$ pip install CrossMap
after that I tried to run:
$ python /usr/local/bin/CrossMap.py
Traceback (most recent call last):
File "bin/CrossMap.py", line 21, in <module>
from bx.bbi.bigwig_file import BigWigFile
ImportError: No module named bigwig_file</module>
So I get bbi directory from https://github.com/mikel-egana-aranguren/SADI-Galaxy-Docker/tree/master/galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/bx/bbi
Copy all of the files contained in there to /usr/local/lib/python2.7/dist-packages/bx/bbi or where you have your bigwig_file installed (I moved files installed previously to a secure location).
Then I run:
**$ python /usr/local/bin/CrossMap.py **
Program: CrossMap (v0.2.6)
Description:
CrossMap is a program for convenient conversion of genome coordinates and
genomeannotation files between assemblies (eg. lift from human hg18 to hg19 or
vice versa).It supports file in BAM, SAM, BED, Wiggle, BigWig, GFF, GTF and VCF
format.
Usage: CrossMap.py [options]
bam convert alignment file in BAM or SAM format.
bed convert genome cooridnate or annotation file in BED or BED-like format.
bigwig convert genome coordinate file in BigWig format.
gff convert genome cooridnate or annotation file in GFF or GTF format.
vcf convert genome coordinate file in VCF format.
wig convert genome coordinate file in Wiggle, or bedGraph format.
I hope it helps
Ok, it seems the culprit is bx-python: if installed with
pip install bx-python, it does not compile some shared libraries. So one needs to download it from PyPI first, then install withpip install bx-python-0.7.3.tar.gz.Downloading the latest archive from https://pypi.python.org/pypi/bx-python/0.7.3 and installing from file worked for me too, thanks @hmontenegro
Downloaded bx-python-0.7.3.tar.gz, installed via pip:
pip install bx-python-0.7.3.tar.gz --upgrade
Still getting ImportError: No module named bigwig_file
OK, must install numpy to get CrossMap to run.
pip install numpy
It's not as simple as just installing numpy if you have already tried to install bx-python. This is what you need to do:
If you don't do it this way bx-python will install with a cached version of bx-python which means you still won't get bigwig_file.
You can install bx-python 0.7.3.