I am having trouble compiling my program when I use htslib. Since this is software many other people are likely to use, I imagine my pain * 10000. Is there a way to read bam files without htslib? I just need the chrom, start, end and strand.
Otherwise, is there a way to include all of htslib in my software?
I am using the bioconda htslib and the flag -Ihtslib
when compiling, but I get the error:
fatal error: htslib/sam.h: No such file or directory
#include "htslib/sam.h"
^~~~~~~~~~~~~~
HTSlib's headers are set up so that they are in an htslib/ subdirectory of an includedir and used with
#include "htslib/sam.h"
etc. This avoids collisions with other libraries that might provide unrelated headers coincidentally named sam.h.So if your
find
command shows /path/to/the/directory/htslib/sam.h, the-I
option you should use will be-I/path/to/the/directory
.So I can include the whole htslib-project in my project if I want other users to compile easily?
what does 'include the whole htslib-project in my project ' means ? are you talking about git submodules ? https://git-scm.com/book/en/v2/Git-Tools-Submodules
I want people to not need to have htslib installed when they compile my software. So I can have a folder with htslib in my codebase and point to it.
You can: It is MIT-licensed. https://github.com/samtools/htslib/blob/develop/LICENSE