Software by Kevin Keenan

Welcome to the software section of Diversity in Life. All software has been written by Kevin Keenan as tools for the analyses of population genetics data. If you have any problems with code (inc. bugs) or would like additional functionality with any of the software, please email me at <kkeenan02@qub.ac.uk>

[UPDATE-05-08-12]Compiled code is now available. See belowSubmission of the package to CRAN is ongoing.

[UPDATE-08-08-12]Following some testing of the packages on a few 'clean systems' that recently became available I noticed some problems with the windows package build. I have now fixed this and the package should install without issue. If anyone notices anymore problems please email me and <kkeenan02@qub.ac.uk>.

[UPDATE-14-08-12]diveRsity is now available on CRAN. Users should simply type;'install.packages("diveRsity")' into their R console to download the package.Alternatively the package can be downloaded below and manually installed.

[UPDATE-11-09-12]A new version of diveRsity (v1.2.2) has just been submitted to CRAN and should be available over the next couple of days. This version consists of a complete rewrite to improve analysis performance, which was seen to be lacking in previous versions. Version 1.2.2 allows users to make use of multiple CPU cores if available, while also providing a default results file containing pairwise matrices that were only available when using the computationally intensive bootstrap algorithm.

[UPDATE-05-10-12]Version 1.2.3 of the diveRsity package has now been submitted to the CRAN repository. This should become available for download over the next few days. This version corrects a bug which seems to only affects mac users. The bug did not impact the validity of returned results. Version 1.2.3 represents an increase in the functionality of diveRsity from previous versions. Pairwise Weir & Cockerham's F-statistics are now available. A user manual is now also distributed with the version, and can be accessed by users by typing 'browseVignettes("diveRsity")' into the R console.

[UPDATE-15-10-12]Version 1.3.0 of the diveRsity package is now available below. This new version comes with two brand new functions for data exploration. The user manual has now also been updated. This new version will be submitted to CRAN over the next couple of weeks.

[UPDATE-08-11-12]Version 1.3.2 of the diveRsity package has just be submitted to CRAN. This version comes with a more flexible genepop file reader, as well as a bug fix which now gives users control over writing results to disk. The new version is also available below.

[UPDATE-14-11-12]Using the fantastic new package from the people who brought us Rstudio, the 'div.part' function has been converted into a web applett which can be easily run from a local work station. Please see the diveRsity online page for details.

[UPDATE-03-01-13]Version 1.3.6 of the diveRsity package has just been submitted to CRAN. This latest version contains two brand new functions, which users may find useful. The first function, 'divOnline', allows users to launch a web app version of the 'div.part' function. This web app is hosted locally, thus the users own resources (e.g. memory, cpu) are used. The online version of this web app is still in development, and an update will be posted here when it becomes available.The second function, 'chiCalc', allows users to assess the genetic heterogeneity between population samples from co-dominant molecular data. The function uses chi-square test frame work to assess if genetic differences between samples are statistically significant.

[UPDATE-26-01-13]Version 1.4.2 of the diveRsity package is now available for download below and will be submitted to CRAN over the next few days. This new version contains a new function 'divBasic' which calculate basic population sample statistics such as Hardy-Weinberg-Equilibrium, Allelic richness and heterozygosity. The functionality of this new feature is also available in the divOnline feature of diveRsity. The main function 'div.part' now contains the additional argument 'pairwise' allowing users to control whether pairwise diversity statistics should be calculated. This process is time consuming for large data sets, thus users can now skip it.

[UPDATE-06-03-13]Version 1.4.4 of the diveRsity package is now available on CRAN (and below). This version introduced two new functions. The first, 'fstOnly', is for the calculation of Weir and Cockerham's (1984) F-statistics from larger data sets. The second, 'divRatio' allows the use of the 'yardstick' approach to diversity standardisation as presented in Skrbinšek, T., Jelenčič, M., Waits, L. P., Potočnik, H., Kos, I., & Trontelj, P. (2012). Using a reference population yardstick to calibrate and compare genetic diversity reported in different studies: an example from the brown bear. Heredity, 109(5), 299–305. doi:10.1038/hdy.2012.42.

NOTE - An important bug was found in previous versions of diveRsity and corrected in this new version (v1.4.4). This bug lead to the calculation of exaggerated confidence intervals which increases the risks of type II error in some instances.

[UPDATE-07-03-13]A bug has been found in v1.4.4 which affects the calculation of the upper confidence interval boundary for global statistics only. Locus intervals and pairwise global intervals are unaffected. A fix has been implemented in the version below (v1.4.4.1).

[UPDATE-01-04-13]Version 1.4.6 of diveRsity has just been uploaded to CRAN. The major change in this version is the addition of a new function 'bigDivPart' which allows the efficient calculation of diversity partitioning and differentiation statistics for very large data sets (e.g. RAD-seq derived SNP loci).

[UPDATE-13-12-13]Version 1.7.0 of diveRsity has just been uploaded to GtiHub (and will be uploaded to CRAN soon). This update sees the introduction of a few new features as well as a pretty serious amendment to the way confidence intervals are calculated. Firstly, since the previous update, noted above, a few new functions have been added, such as haploDiv, which allows the calculation of Weir & Cockerham's Fst from haploid genotype data, and divMigrate which uses an experimental method developed by Lisa Sundqvist and colleagues, for the pairwise estimation of the direction of migration (more info here). Users are encouraged to see the package documentation for more details about new features.

Secondly, it was brought to my attention that the pairwise confidence intervals calculated by the new function 'fastDivPart' as well as 'divPart' were upwardly biased. This is a well known problem with estimation of parameters such as D (Jost, 2008) and Fst (Weir & Cockerham, 1984) from resampled data. While in most cases, this does not present much of an issue, for some data, the risk of increased Type I error is increased substantially. For this reason I have included bias corrected confidence intervals for pairwise comparisons as well as the standard, uncorrected confidence intervals. These are returned to the user in the 'bs_pairwise' tab of the output file(s), as well as the 'bs_pairwise' slot of the output object returned from 'fastDivPart'.It is important to note that 'divPart' does not calculate the bias corrected confidence intervals, as I intend to phase the function out, replacing it with 'fastDivPart' as the workhorse of diveRsity.

How to access diveRsityThere are two main ways to get access to diveRsity. The first is through standard installation of the package from CRAN in the R console. Type the following into R:

POWSIM.file.create

Source code v1.0

POWSIM is a nice piece of software for assessing statistical power provided by molecular data. This small piece of code allows you to create sequential input files for the software (starting with one locus and sequentially adding loci until all are present. Download the following folder. It contains the function code, a test input file and an example code file. Try it out to see if it does what you need!! See my blog post for the story behind this code.