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 https://github.com/nescent/popgenInfo/tree/master/TEMPLATE.Rmd.
All biological analyses have assumptions.
- Assumption 1
- Assumption 2
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)
Section 1: Load the data
We will import "nancycats.gtx" to a "genind" object (from the package
nancycats <- import2genind("nancycats.gtx") nancycats
# 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") nancycats
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) nan_summary
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.
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)
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) devtools::session_info()