Fetching contributors…
Cannot retrieve contributors at this time
122 lines (81 sloc) 3.04 KB
Template Vignette

Research Question

A short sentence describing the question central to the analysis.


Explain the purpose of the vignette. Give a brief explanation of the questions that will be answered and some background information. These vignettes are written in Rmarkdown. You can find details about markdown here and details about code chunks here.

This template document in Rmarkdown format is located at


All biological analyses have assumptions.

  • Assumption 1
  • Assumption 2



Links to information about the data if needed e.g. package vignettes. You can use an external link or you can place the data in the data/ folder (please keep this < 200kb).


Packages required. Say where these can be found, can link to the list of packages on our repository page here also.

Loading the required packages:


Analysis (divided into sections)

Example Sections

Section 1: Load the data

We will import "nancycats.gtx" to a "genind" object (from the package adegenet) called nancycats.

nancycats <- import2genind("nancycats.gtx")
# Note: the code chunk above will be shown to the reader, but it will not run.
# This code chunk will run, but will not be shown to the reader.
nancycats <- import2genind("../data/nancycats.gtx")

Section 2: Exploratory Data analysis/Checking assumptions

Section 3: Summary statistics

Sometimes packages contain their own useful summary statistics, such as expected heterozygosity.

nan_summary <- summary(nancycats)

Section 4: Visualizing the results

Often, it's useful to plot these results.

plot(nan_summary$Hexp, nan_summary$Hobs, 
     xlab = "Expected Heterozygosity", ylab = "Observed Heterozygosity")
abline(0, 1, lty = 2) # adding a 1:1 line

This plot shows us that the observed heterozygosity of these cat colonies is lower than the expected heterozygosity.


What's next

Information on further analysis that could be done, other workflows can be linked as well (note the HTML as opposed to Rmd link).


  • Author 1 (Author)
  • Author 2 (Author)
  • Contributor 1 (role)

Session Information

This shows us useful information for reproducibility. Of particular importance are the versions of R and the packages used to create this workflow. It is considered good practice to record this information with every analysis.

options(width = 100)