Bacsnp is a tool that can help decipher populations of baculoviruses. It is written in R programming language and uses files of the Variant Call Format, which were created with Mpileup and is able to assign specificities to detected SNP positions.

How the bacsnp can be integrated into a workflow can be found in detail in the following publication:

Wennmann, Jörg T.; Fan, Jiangbin; Jehle, Johannes A. 2020. "Bacsnp: Using Single Nucleotide Polymorphism (SNP) Specificities and Frequencies to Identify Genotype Composition in Baculoviruses." Viruses 12, no. 6: 625.

Getting Started

In the following section I will try to explain how to install bacsnp for R on your computer.


The tool was written in the R programming language and therefore requires the latest version of R to be installed on the computer. In addition, I recommend using RStudio. The following packages for R should also be installed:

To install the devtool and ggplot2 package, the following steps can be carried out in the R console:


Make sure you have the latest version of Bioconductor installed. You can install it for R by following the instructions on the Bioconductor homepage. Then you can install the VariantAnnotation package.


Check if everything is installed correctly by starting the packages.


The packages should start without any error messages.

How to install bacsnp from Github

Next we look at how we install bacsnp directly from Github in R. This step requires the devtools package, which is available via CRAN. It must be installed and initiated.


The bacsnp package is locaetd in my repository wennj/bacsnp. For its installation you type

install_github("wennj/bacsnp", build_vignettes = TRUE)

which should install the bacsnp package along with its vignette (the packages introduction and description). After installation, you should be able to start it as usual to use it straight away.


Getting started

In this section we will focus on how to use bacsnp. Bacsnp requires a Variant Call Format (VCF) file that was created with Mpileup for one or more sequenced isolates of a baculovirus species. The vignette of the package also offers further information, which can be opened with the following command:



Running the tests

To be continued.

Break down into end to end tests

To be continued.

And coding style tests

To be continued.


To be continued.


To be continued.


To be continued.


To be continued.


To be continued.

wennj/bacsnp documentation built on July 13, 2020, 1:19 p.m.