Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


R package for interacting with the parentage analysis software Cervus from within an R environment. The package also includes functions to make working with CervusCL via Wine (i.e. on Linux/MacOS) easier.


You need to have an understanding of how Cervus works to use this package fully, as without the GUI, it is easy to misspecify an analysis and draw incorrect inferences from the results. However, it is also possible to run an analysis that has been specified using the GUI of Cervus, which may be preferable depending on your workflow. This package is also only tested in a narrow sense, with functions written primarily for use with my current project. It is made public to allow for others to replicate my results using the same scripts, and to help others who might want to do similar things.


The package can be currently installed from GitHub using the following commands:

# install.package("devtools")

To install the lastest version of Cervus (package developed using, follow the instructions on the field genetics website.

The package relies on the ini, dplyr, stringr and tidyr packages.

Using MacOS or Linux?

It is quite easy to run Cervus via Wine on both MacOS and Linux. I've tested that the results are identical across platforms, and find run times are as expected (and much faster compared to running a VM). For more info see: Running Cervus using Wine


The package's goal is to reduce interaction with the Cervus GUI by providing a method to interact with the command line version of Cervus (CervusCL) from within an R environment. Currently, the package is being written to complement a meta-analysis I am working on, so development of features as and when I need them will take priority. This is also my first R package, so I am treating it as a learning exercise. I have made the code public in case someone finds it useful. It is not tested beyond the needs of my current analysis.

ceRvus can currently parameterise and run:

  • Allele frequency analysis
  • Parentage simulation
  • Parentage analysis

(It currently cannot handle identity analyses, but this would be easy to add if required)

from within R, as well as importing Cervus' output directly into R. It does this through creating/editing the .crv file that Cervus uses to store settings, and by parsing the .txt files that contain results into a format friendly for creating publication quality tables, or for performing further analysis within R.

In general, the package expects all the files for the analysis to be located within a single folder.

It is left up to the user to decide if they want to work with their genotype data in R, then export, or just work with already existing datafiles. Care should be taken when exporting from R to then be used in Cervus, ESPECIALLY WITH REGARD TO NAs. Cervus will treat the string 'NA' as an allele and estimate it's frequency etc!

The package is by no-means perfect, it is very janky and hacky, but it functions. As all the heavy lifting is still done by CervusCL, so there is no performance loss or gain.


Open an Issue on GitHub, and I will get back to you when I can. Any suggestions, please open a pull request.


R package for interacting with the parentage analysis software Cervus from within an R environment







No packages published