zeeev / wham

Structural variant detection and association testing
Other
101 stars 25 forks source link

Update to Makefile needed for updated bamtools build. #47

Open srynobio opened 6 years ago

srynobio commented 6 years ago

Bamtools, which is one of the requirements of wham, it recursively installed and built as part of your Makefile. However the build requirements and lib path has changed in the newest version of bamtools. This does not allow a completed build when using a new "docker" environment.

zeeev commented 6 years ago

Hi @srynobio,

I understand the problem, but without logs, error, or any other information there's not much I can do :(.

--Zev

srynobio commented 6 years ago

@zeeev Understand. I'll get a more detailed reports with logs and post them.

srynobio commented 6 years ago

@zeeev I'm adding this to further explain the issue I'm seeing.

Background

I'm building a docker container to use wham on the AWS cloud, and based on your listed requirements:

Installing whamg

whamg depends on CMake and OpenMP. These dependances are commonly preinstalled on various Linux distributions. The following command should install wham into your current working directory:

I currently install CMake and OpenMP via the following dockerfile.

FROM ubuntu:latest
MAINTAINER Shawn Rynearson "shawn.rynearson@gmail.com"

LABEL UCGD-Pipeline.Version="2.8.23"
LABEL vender="UCGD"

RUN apt-get update && apt-get -y install \
    git \
    build-essential \
    wget \
    cmake \
    zlib1g-dev \
    libjsoncpp1 \
    libjsoncpp-dev

## install openmpi 
RUN wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.1.tar.gz
RUN tar -vxf openmpi-3.1.1.tar.gz
RUN cd openmpi* && ./configure --prefix="/home/$USER/.openmpi"; make; make install

ENV PATH="$PATH:/home/$USER/.openmpi/bin"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/$USER/.openmpi/lib/"

Version check of CMake in the built image:

$> cmake --version
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

Version check of OpenMP in the built image:

$> gcc --version
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$> echo |cpp -fopenmp -dM |grep -i open
#define _OPENMP 201511

However when I run your install command:

git clone --recursive  https://github.com/zeeev/wham.git; cd wham; make

I get the following errors:

...
src/toolkit/CMakeFiles/bamtools_cmd.dir/build.make:254: recipe for target 'src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o' failed
make[3]: *** [src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o] Error 1
make[3]: Leaving directory '/wham/src/bamtools/build'
CMakeFiles/Makefile2:520: recipe for target 'src/toolkit/CMakeFiles/bamtools_cmd.dir/all' failed
make[2]: *** [src/toolkit/CMakeFiles/bamtools_cmd.dir/all] Error 2
make[2]: Leaving directory '/wham/src/bamtools/build'
Makefile:129: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/wham/src/bamtools/build'
Makefile:26: recipe for target 'src/bamtools/lib/libbamtools.a' failed
make: *** [src/bamtools/lib/libbamtools.a] Error 2

So the build fails on what appears to be the bamtools build step. Now to test if the dockerfile build everything required for bamtools I ran an independent build found on their wiki.

Build:

$> git clone git://github.com/pezmaster31/bamtools.git

$> mkdir build
$> cd build
$> cmake -DCMAKE_INSTALL_PREFIX=./ ..
$> make
$> make install

And it installs correctly:

$> ./bamtools

usage: bamtools [--help] COMMAND [ARGS]

Available bamtools commands:
    convert         Converts between BAM and a number of other formats
    count           Prints number of alignments in BAM file(s)
    coverage        Prints coverage statistics from the input BAM file
    filter          Filters BAM file(s) by user-specified criteria
    header          Prints BAM header information
    index           Generates index for BAM file
    merge           Merge multiple BAM files into single file
    random          Select random alignments from existing BAM file(s), intended more as a testing tool.
    resolve         Resolves paired-end reads (marking the IsProperPair flag as needed)
    revert          Removes duplicate marks and restores original base qualities
    sort            Sorts the BAM file according to some criteria
    split           Splits a BAM file on user-specified property, creating a new BAM output file for each value found
    stats           Prints some basic statistics from input BAM file(s)

See 'bamtools help COMMAND' for more information on a specific command.

This leads me to believe that your Makefile may need to be updated to work with the updated bamtools build. Possably this: LBAMTOOLS=src/bamtools/lib/libbamtools.a

zeeev commented 6 years ago

Hi @srynobio,

Sorry it took me a while to get to this. What happens if you go into the bamtools submodule, in whamg, prior to building and then update the branch? If that solves the problem, I'll just update the bamtools submodule commit.

Best,

Zev

zeeev commented 6 years ago

Hi @srynobio,

Did you attempt the solution I suggested?

Zev

zeeev commented 6 years ago

Let's just setup a 5 minute call. I tried the lab, but no one answered.