[Bioc-devel] unit tests for C code inside a package
grassi.e at gmail.com
Mon Jan 26 10:14:59 CET 2015
I'm writing a package that calculates total affinity (see PMID
21335606 and 16873464 if transcription factors are your thing):
up until now in our lab we've used a pure C tool that needs fasta and
tabular formatted PFM-PWM files but we are willing to produce
something more comfortable that stems from some related Bioc packages
(TFBSTools and JASPAR2014 basically).
The package has two simple R methods that call a C entry point and
then all the calculations are performed by the C code.
I'd like to write extended unit tests but I am not sure how to do it:
I've some tests for the R portions (that obviously depends
also on the C calculation in some parts) but I would like to test in a
more fine grained way the C code therefore RUnit and BiocGenerics
seems to solve only a portion of my problem. I would like to use a
C-based library for unit testing and link it to the automatic
check done for the package thanks to BiocGenerics: is this reasonable?
I've looked at some other packages without being able to find
something similar to this.
I've read http://stackoverflow.com/questions/26322135/unit-testing-rcpp-code-in-a-package,
but I think
that it would be nice to test the C code with the whole package.
ps. the source code right now is here:
https://github.com/vodkatad/MatrixRider (the vignette is on its way,
the nodevel branch is the one active now and it works with R version
3.1.2 and Bioconductor 3.0 for our internal use).
More information about the Bioc-devel