Pindel installation failing due to htslib
3
0
Entering edit mode
4.9 years ago

I have made the following Dockerfile to install pindel:

# Use Python base image from DockerHub
FROM python:2.7

RUN apt-get update && apt-get install -y \
  bzip2 \
  wget \
  make \
  ncurses-dev \
  zlib1g-dev \
  g++ \
  python-pip \
  git \
  gcc \
  liblzma-dev

RUN pip install awscli boto3

# Install htslib
WORKDIR /usr/bin
RUN wget https://github.com/samtools/htslib/releases/download/1.9/htslib-1.9.tar.bz2 \
    && tar -vxjf htslib-1.9.tar.bz2 \
    && cd htslib-1.9 \
    && make

# Install pindel
WORKDIR /usr/bin
RUN git clone git://github.com/genome/pindel.git \
    && cd pindel \
    && ./INSTALL /usr/bin/htslib-1.9/

ENV PATH="/usr/bin/:$PATH"

However, when I try building this image, I get errors such as:

   ^~~
make[1]: Leaving directory '/usr/bin/pindel/src'
make[1]: *** [Makefile:47: pindel.o] Error 1
make: *** [Makefile:12: pindel] Error 2

INSTALL failed
Possible reasons: 
1. 'cannot cd to [path]
->the htslib path provided was incorrect

2. 'cannot find -lbam'
->htslib was not properly compiled/made, in that case, go to the htslib directory and follow the htslib installation instructions
and run 'make'.

or

compilation terminated.
In file included from output_sorter.cpp:27:
pindel.h:34:10: fatal error: htslib/khash.h: No such file or directory
 #include "htslib/khash.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from reporter.h:27,
                 from search_tandem_duplications_nt.cpp:23:
pindel.h:34:10: fatal error: htslib/khash.h: No such file or directory
 #include "htslib/khash.h"
          ^~~~~~~~~~~~~~~~
compilation terminated.
In file included from reporter.h:27,
                 from search_tandem_duplications.cpp:23:
pindel.h:34:10: fatal error: htslib/khash.h: No such file or directory
 #include "htslib/khash.h"
          ^~~~~~~~~~~~~~~~

I have tried installing both htslib and samtools and referring to those directories in my ./INSTALL ... command, but nothing is working! I even tried walking through these installation steps manually on an Amazon instance and get the following error:

mv: cannot stat ‘src/pindel’: No such file or directory
mv: cannot stat ‘src/pindel2vcf’: No such file or directory
mv: cannot stat ‘src/sam2pindel’: No such file or directory
mv: cannot stat ‘src/pindel2vcf4tcga’: No such file or directory

Help would be much appreciated :)

htslib pindel docker • 3.2k views
ADD COMMENT
0
Entering edit mode
4.9 years ago
Mensur Dlakic ★ 28k

If I understand this script correctly, it is trying to download, compile, and install in WORKDIR /usr/bin. First, I think that's a terrible idea to begin with, at least for downloading and compiling. Second, don't think this script can be executed in /usr/bin without root privileges.

I would suggest manually cloning both programs in a different directory from /usr/bin and compiling them one by one. Simply copy/paste the commands from the script.

ADD COMMENT
0
Entering edit mode

Thank you. I have already tried using other directories in the script besides /usr/bin for downloading and compiling, however I still get the same error. And the whole point of using a Docker container is to bypass any "manual" steps; I'm trying to use this Pindel program as part of a bioinformatics pipeline.

ADD REPLY
0
Entering edit mode

This is a docker recipe. What is described in, though it could be done differently, shouldn't be as "terrible" as you think. And definitely not the reason for the errors.

ADD REPLY
0
Entering edit mode
4.7 years ago

Pindel will not compile with newer versions of htslib. Try with the latest release of the 1.3 version instead. You probably also need to apply this patch in order to compile Pindel on anything newer than debian 7.0 (or based on).

ADD COMMENT
0
Entering edit mode
4.7 years ago
steve ★ 3.5k

Try this:

FROM ubuntu:16.04

RUN apt-get update && \
apt-get install -y wget \
bzip2

RUN wget https://repo.continuum.io/miniconda/Miniconda3-4.4.10-Linux-x86_64.sh && \
bash Miniconda3-4.4.10-Linux-x86_64.sh -b -p /conda && \
rm -f Miniconda3-4.4.10-Linux-x86_64.sh
ENV PATH="/conda/bin:${PATH}"

RUN conda config --add channels defaults
RUN conda config --add channels bioconda

RUN conda install -y -c bioconda pindel=0.2.5b9
ADD COMMENT

Login before adding your answer.

Traffic: 1868 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6