Subject: | Bio-SamTools-1.43 is confused about what various SAMtools build dirs supply where - and so am I |
Date: | Wed, 3 Aug 2016 17:39:59 +1200 |
To: | bug-Bio-SamTools [...] rt.cpan.org |
From: | Kevin Buckley <kevin.buckley.ecs.vuw.ac.nz [...] gmail.com> |
Came to add Bio-SamTools-1.43 into a BioPerl installtion
cpan[1]> install LDS/Bio-SamTools-1.43.tar.gz
I get told that
Show quoted text
> This module requires samtools 0.1.10 or higher (samtools.sourceforge.net).
> Please enter the location of the bam.h and compiled libbam.a files:
so I supply the path to the directory in which I built SAMtools 1.3
path/to/my/samtools-1.3/
The Bio-SamTools-1.43 build then fails telling me that
In file included from c_bin/bam2bedgraph.c:2:
/path/to/my/samtools-1.3/sam.h:28:24: \
error: htslib/sam.h: No such file or directory
and that's right, because
samtools-1.3/
has an
htslib-1.3/
subdirectory and not a plain, unversioned
htslib/
subdirectory .
Furthermore, inside the htslib-1.3 subdirectory there is no file
sam.h
but there is a file named
sam.h
in the top-level samtools-1.3 directory.
I therefore create a link
htslib -> htslib-1.3/
and within htslib-1.3, another link
sam.h -> ../sam.h
and the build gets further, before failing with this one
/path/to/my/samtools-1.3/bam.h:48:25:
error: htslib/bgzf.h: No such file or directory
and that's where I run out of ideas, because that header (* see below)
doesn't exist anywhere in samtools-1.3, let alone where Bio-SamTools
seems to think it should be.
I also tried looking in SAMtools 0.1.19 (after all there are a multitude of
SAM/BAM/THANKYOU/MAM/tools out there in BioInfo-land) but that
doesn't have an
htslib
subdirectory of any kind.
* But read on
I become aware that although there is no header file, bgzf.h, in samtools 1.3
there is a bgzf.c inside the
htslib-1.3/
subdirectory and I see that that #includes
htslib/bgzf.h
at which point I realise that the
htslib-1.3/
subdirectory has it's own (unversioned)
htslib
subdirectory (or subsubdirectory of samtools 1.3 if you prefer)
and inside there I find all of these fine fellows
bgzf.h hts.h klist.h regisubdirectory (or
subsubdirectory dx.h vcf_sweep.h
cram.h kbitset.h knetfile.h sam.h vcfutils.h
faidx.h kfunc.h kseq.h synced_bcf_reader.h
hfile.h khash.h ksort.h tbx.h
hts_defs.h khash_str2int.h kstring.h vcf.h
so now I am assuming that subdirectory. or subsubdirectory, depending where
you start from is what Bio-SamTools is probably looking for, so I undo all my
previous attempts to trick Bio-SamTools into finding what it wants to find by
creating a link from the top-level
samtools-1.3/
directory, where you'll recall, libbam.a is, as
htslib -> htslib-1.3/htslib/
And, after all that, Bio-SamTools tells me
lib/Bio/DB/Sam.xs:29:19: error: khash.h: No such file or directory
but, as we saw above
khash.h:
is there for all to see.
I know I must have missed something obvious: but what ?
Any clues welcome.
Kevin M. Buckley
eScience Consultant
School of Engineering and Computer Science
Victoria University of Wellington
New Zealand