Brian J. Knaus

Brian J. Knaus’s blog about genomics and biology.

Running r-devel-ubsan-clang in Docker

My R package, vcfR Version 1.5.0, currently has an issue with clang-UBSAN. This can be seen at it’s CRAN site and clicking the link for ‘CRAN checks.’ Under the section ‘Additional issues’ it lists ‘clang-UBSAN’. clang is ‘a C language family frontend for LLVM’ that is typically used as the compiler on OSX (Macs) when Xcode is installed. The undefined behavior sanitizer (UBSAN) tests for issues such as memory overflows. In order for UBSAN to work you need a version of R that is compiled specifically for this purpose. Read more →

CRAN memory error

I have a package on CRAN where the CRAN tests are reporting a memory error. In order to use the address sanitizer (ASAN) we need to have a version of R that has been compiled specially to make use of it. In a previous post I described how we can use Docker to run rocker images so we do not have to change our system R. I’ve also validated the ASAN is working. Read more →

Validating ASAN

The address sanitizer (ASAN) is a tool produced by google that detects memory coruption bugs. It is relevant to the work I do, in part, because CRAN checks contributed packages with this tool. This is a good practice on the part of CRAN to ensure that packages it hosts lack bugs. However, if you are unfamiliar with this tool it may present a formidable challenge to use. Here I explain how I’ve implemented it in my work. Read more →

A first post using blogdown

Once you have Hugo and blogdown set up you should be ready to blog! How to set up Hugo and blogdown was briefly covered in a previous post, with links to more information. We can use blogdown to create a template for our first blog. library(blogdown) new_post(title="A first post using blogdown", rmd = TRUE) This creates a file named: ./content/post/2017-06-03-a-first-post-using-blogdown.Rmd where ‘.’ is the root directory of your github.io project. The function new_post() prefixes your post’s title with todays date to create the filename. Read more →

Running R in Docker

Docker is a ‘container,’ or a mini-operating system, you can run within your existing operating system. This is nice because you can build an environment where you can build and test code. And if it breaks, you can kill it and start a new container and start again. In the context of R development there are at least two good reasons someone would want to run R in Docker. First, the CRAN Repository Policy (Version $Revision: 3679 $) asserts that submitted packages should be tested with the current version of R-devel. Read more →