%\VignetteEngine{knitr::knitr} %\VignetteIndexEntry{Motivation and Use of Rhtslib}
This package provides a compiled version of the C
htslib
for high-throughput seqeunce
analysis. It is primary useful to developers of other R packages who
want to use the htslib facilities in the C code of their own packages.
There are several advantages to using Rhtslib
, rather than requiring
an explict user system dependency on htslib
directly.
Rhtslib
means that your users (who are not always
sophisticated system administrators) do not need to manually install
their own library.htslib
, so that you as
a developer can rely on presence of specific features (and bugs!)
rather than writing code to manage different library versions.Packages with C code should create a file src/Makevars
with the
following lines
PKG_CFLAGS+=$(shell echo 'Rhtslib::pkgconfig("PKG_CFLAGS")'|\ "${R_HOME}/bin/R" --vanilla --slave) PKG_LIBS+=$(shell echo 'Rhtslib::pkgconfig("PKG_LIBS")'|\ "${R_HOME}/bin/R" --vanilla --slave)
In C or C++ code files, use standard techniques, e.g., #include
"htslib.h"
. Header files are available at
{R headers}
system.file(package="Rhtslib", "include")
The procedure above links to the shared version of the htslib library. This will work on Linux, Mac, and Windows OS, but some tweaks may be needed on other platforms; please let me know of incompatibilities.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.