This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to fix CrossMap tool installation errors and what other tool can do BED2VCF conversion?

How to fix CrossMap tool installation errors and what other tool can do BED2VCF conversion?

After running sudo pip install CrossMap I get:

mat29@mat29-VirtualBox ~ $ pip install CrossMap
Collecting CrossMap
  Using cached CrossMap-0.2.7-py2-none-any.whl
Collecting bx-python (from CrossMap)
  Using cached bx-python-0.8.1.tar.gz
Collecting pysam (from CrossMap)
  Using cached pysam-0.14.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cython>=0.17 (from CrossMap)
  Using cached Cython-0.28.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting python-lzo (from bx-python->CrossMap)
  Using cached python-lzo-1.11.tar.gz
Collecting numpy (from bx-python->CrossMap)
  Using cached numpy-1.14.2-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already satisfied: six in ./.local/lib/python2.7/site-packages (from bx-python->CrossMap)
Installing collected packages: python-lzo, numpy, bx-python, pysam, cython, CrossMap
  Running setup.py install for python-lzo ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-TTnehn/python-lzo/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-b5QMhX-record/install-record.txt --single-version-externally-managed --compile:
    /usr/lib/python2.7/distutils/dist.py:251: UserWarning: 'licence' distribution option is deprecated; use 'license'
      warnings.warn(msg)
    running install
    running build
    running build_ext
    building 'lzo' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/lzo -I/usr/include/python2.7 -c lzomodule.c -o build/temp.linux-x86_64-2.7/lzomodule.o
    lzomodule.c:35:19: fatal error: lzo1x.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
software error crossmap bed2vcf

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time. Formatting bar

1 answer

From the error message, the program needs lzo1x.h for compilation which is in the package liblzo2-dev assuming you're using Ubuntu/Debian. If not, you can do a search in your package manager using the keyword lzo to locate the respective library.

Here is how I located the library on Ubuntu using apt-file (separate program, available in the repositories):

apt-file search lzo1x.h
liblzo2-dev: /usr/include/lzo/lzo1x.h

You should try compiling again after installing liblzo2-dev.

Log in to answer this question.