Error Installing Samtools Library On Linux (Centos 6)
2
0
Entering edit mode
10.6 years ago
merbergd ▴ 10

Two questions about installing Samtools with the api:

  • I downloaded the zip file from the development branch of the samtools site on github (https://github.com/samtools/samtools). Is this the correct repository? (I already have version 0.1.18 installed, but I don't think I have the library)

  • When I try to build using make, I get this error:

    Makefile:7: ../htslib/htslib.mk: No such file or directory make: No rule to make target `../htslib/htslib.mk'. Stop.

Near the top of the Makefile, there are a few lines that look like this:

Adjust $(HTSDIR) to point to your top-level htslib directory
HTSDIR = ../htslib
include $(HTSDIR)/htslib.mk

I didn't have an htslib directory before - I'm not sure what it's looking for. I tried creating an empty "htslib" directory in the appropriate place, but it didn't help.

If this is the right repository, how do I make the build work?

Thanks very much.

samtools api • 13k views
ADD COMMENT
4
Entering edit mode
10.6 years ago

As of today, the _develop_ samtools branch there is bleeding-edge pre-release code. If you don't want to be using such code, you would probably do better by downloading a formal release or building the _standalone_ branch, which is the last version that does not require htslib.

Samtools is moving to using htslib for low-level functionality. HTSlib is at https://github.com/samtools/htslib, and the samtools makefile expects to find the _develop_ branch of that repository checked out at $(HTSDIR), i.e., normally alongside your samtools source code.

When we release an htslib-based samtools, the source tarball will contain an appropriate htslib, so building it will be as easy as it has been in the past. However at the moment, the build infrastructure is in progress and you get to put the pieces together yourself.

ADD COMMENT
0
Entering edit mode

Thank you. It turns out that what I actually need is an older version. I've been trying to install bam-readcount and was not successful with samtools 0.1.18 or 0.1.19. So I looked for a newer version. But actually, I need 0.1.17. That installed easily and I'm all set.

ADD REPLY
0
Entering edit mode

Hmmm... bam-readcount compiles fine for me with samtools 0.1.19 or with the _standalone_ branch from samtools at GitHub.

ADD REPLY
0
Entering edit mode

OK, it could easily have been my mistake - In my initial attempts I may have had SAMTOOLS_ROOT pointing to a directory that just contains the samtoools executable, rather than the full distribution.

ADD REPLY
0
Entering edit mode
10.6 years ago

It's looking for htslib, which will be used by future versions of samtools. You probably want the current non-devel version, available here.

ADD COMMENT
0
Entering edit mode

Thank you. It turns out I wanted 0.1.17 in order to install bam-readcount.

ADD REPLY

Login before adding your answer.

Traffic: 1487 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