statgen / demuxlet

Genetic multiplexing of barcoded single cell RNA-seq
Apache License 2.0
116 stars 25 forks source link

Installation failure #66

Open howardBDC123 opened 4 years ago

howardBDC123 commented 4 years ago

I am trying to install demuxlet on my system running Ubuntu 18.04. As instructed I first installed htslib-develop into a directory on my desktop, then downloaded demuxlet into the htslib-develop directory which now contains cram, demuxlet, htslib, m4, os, and test directories as well as the htslib code files and a cache DIR. However, when I ran make after doing the autoconfigure I got the error: In file included from hts_utils.cpp:24:0: hts_utils.h:40:10: fatal error: htslib/kseq.h: No such file or directory

include "htslib/kseq.h"

      ^~~~~~~~~~~~~~~

compilation terminated.

When I tried a second time the full output was davidsho@HSC-DAVIDSON2:~/Desktop/Demuxlet/htslib-develop/demuxlet$ make make all-am make[1]: Entering directory '/home/davidsho/Desktop/Demuxlet/htslib-develop/demuxlet' /home/davidsho/miniconda3/bin/x86_64-conda_cos6-linux-gnu-c++ -DHAVE_CONFIG_H -I. -I ../htslib/ -I ../../htslib/htslib -pipe -D__STDC_LIMIT_MACROS -Wall -Wno-unused-local-typedefs -Wno-enum-compare -fpic -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/davidsho/miniconda3/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/davidsho/miniconda3/include -MT hts_utils.o -MD -MP -MF .deps/hts_utils.Tpo -c -o hts_utils.o hts_utils.cpp In file included from hts_utils.cpp:24:0: hts_utils.h:40:10: fatal error: htslib/kseq.h: No such file or directory

include "htslib/kseq.h"

      ^~~~~~~~~~~~~~~

compilation terminated. make[1]: [Makefile:491: hts_utils.o] Error 1 make[1]: Leaving directory '/home/davidsho/Desktop/Demuxlet/htslib-develop/demuxlet' make: [Makefile:359: all] Error 2

I suspect I've made a basic mistake somewhere, but as the kseq-h file is in the htslib DIR, and the htslib DIR is in the same DIR as the demuxlet DIR, I don't have any clue where I've gone wrong, and so would greatly appreciate your advice as to how to fix this problem.

Many thanks

skchronicles commented 2 years ago

I ran into this issue earlier too. The sibling htslib directory needs to be named htslib or it will fail.

Here is a basic set of instructions for installing both htslib and demuxlet:

# Step 1. Install and build HTSlib 1.10 (required by demuxlet)
# Needs to be a sibling directory to demuxlet install,
# the name of the htslib directory must be called htslib
wget https://github.com/samtools/htslib/releases/download/1.10/htslib-1.10.tar.bz2 \
    && tar -vxjf htslib-1.10.tar.bz2 \
    && rm htslib-1.10.tar.bz2 \
    && cd htslib-1.10 \
    && autoreconf -i \
    && ./configure \
    && make \
    && make install \
    && ln -s /opt2/htslib-1.10 /opt2/htslib \
    && cd ..

# Step 2. Install and build demuxlet, the ./configure command 
# needs libtool installed first   
DEBIAN_FRONTEND=noninteractive apt-get install -y libtool \
    && git clone https://github.com/statgen/demuxlet.git \
    && cd demuxlet \
    && autoreconf -vfi \
    && ./configure \
    && make \
    && make install

I hope this helps!

Best Regards, @skchronicles