1
$\begingroup$

I'm having trouble install shapeit4 4.2.2 on my new Mint 21 installation (Ubuntu 22.04 LTS). According to the official docs, the requirements are:

  • HTSlib: A great C library for reading/writing high-throughput sequencing data.
  • BOOST: A free peer-reviewed portable C++ source libraries. SHAPEIT4 uses two specific BOOST libraries: iostreams and program_options.

I installed HTSlib with make and sudo make install, and libboost using its calls ./bootstrap and ./b2 but I still get errors when trying to run the make file for shapeit4:

/usr/bin/ld: cannot find /home/user/Tools/htslib-1.11/libhts.a: No such file or directory
/usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu/libboost_iostreams.a: No such file or directory
/usr/bin/ld: cannot find /usr/lib/x86_64-linux-gnu/libboost_program_options.a: No such file or directory
$\endgroup$

3 Answers 3

1
$\begingroup$

Manually editing makefiles is just... ugh. Save yourself the effort and use conda:

conda create -n shapeit
conda install -c bioconda shapeit4 -n shapeit
$\endgroup$
0
$\begingroup$

The documentation appears to be missing an edit one has to do. Open the makefile in the shapeit4 dir, and you will see something like (for version 4.2.2):

#COMPILER MODE C++11
CXX=g++ -std=c++11

#HTSLIB LIBRARY [SPECIFY YOUR OWN PATHS]
HTSLIB_INC=$(HOME)/Tools/htslib-1.11
HTSLIB_LIB=$(HOME)/Tools/htslib-1.11/libhts.a

#BOOST IOSTREAM & PROGRAM_OPTION LIBRARIES [SPECIFY YOUR OWN PATHS]
BOOST_INC=/usr/include
BOOST_LIB_IO=/usr/lib/x86_64-linux-gnu/libboost_iostreams.a
BOOST_LIB_PO=/usr/lib/x86_64-linux-gnu/libboost_program_options.a

So the paths appear to be hardcoded. Set these to the paths where you installed htslib (and compile it first).

For libboost, I found that its own installer doesn't place files in this expected location. So you can either change these paths to where you installed libboost, or you can use the apt manager version which will put the files in the right location by default. This is done with sudo apt-get install libboost-all-dev (found here).

After this, just run the make file again, and the output should looks like this:

user@computer:/dir/shapeit4-4.2.2$ make
make: Nothing to be done for 'all'.
$\endgroup$
0
$\begingroup$

Actually, precompiled SHAPEIT 4.2.2 is available in a Ubuntu repository.

sudo apt install shapeit4
$\endgroup$
1
  • $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Feb 17, 2023 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.