Learn R Programming

⚠️There's a newer version (2.9.6) of this package.Take me there.

Poppr version 2

What is poppr?

Poppr is an R package designed for analysis of populations with mixed modes of sexual and clonal reproduction. It is built around the framework of adegenet's genind and genlight objects and offers the following implementations:

  • clone censoring of populations at any of multiple levels of a hierarchy
  • convenient counting of multilocus genotypes and sub-setting of populations with multiple levels of hierarchy
  • define multilocus genotypes
  • calculation of indices of genotypic diversity, evenness, richness, and rarefaction
  • drawing of dendrograms with bootstrap support for genetic distances
  • drawing of minimum spanning networks for genetic distances
  • calculation of the index of association

() or ()

  • batch processing on any server that has R ( ≥ 2.15.1) installed
  • calculation of Bruvo's distance for microsatellite (SSR) markers (implemented in C for speed)
  • import of data from and export to GenAlEx

New in version 2.0:

  • handling of genomic SNP data
  • custom multilocus genotype definitions
  • collapse multilocus lineages by genetic distance
  • calculate reticulate minimum spanning networks
  • calculate index of association in a sliding window across snps
  • bootstrapping of MLG diversity statistics
  • interactive exploration of minimum spanning networks
  • and more!

For full details, see the NEWS file or type in your R console:

news(Version >= "2.0.0", package = "poppr")

Citation

If you use poppr at all, please specify the version and cite:

Kamvar ZN, Tabima JF, Grünwald NJ. (2014) Poppr: an R package for genetic analysis of populations with clonal, partially clonal, and/or sexual reproduction. PeerJ 2:e281 http://dx.doi.org/10.7717/peerj.281

If you use poppr in a presentation please mention it as the poppr R package, specify the version, and use our logo: (png) | (svg).

Additionally, if you use any following functionalities:

  • minimum spanning networks with reticulation
  • collapsing multilocus genotypes into multilocus lineages with mlg.filter()
  • custom multilocus genotype definitions with mlg.custom()
  • index of association for genomic data with win.ia() or samp.ia()
  • bootstrapping any genetic distance with genind, genlight, or genpop objects with aboot()

Please also cite:

Kamvar ZN, Brooks JC and Grünwald NJ (2015) Novel R tools for analysis of genome-wide population genetic data with emphasis on clonality. Front. Genet. 6:208. doi: 10.3389/fgene.2015.00208

You can obtain citation information in R by typing:

citation(package = "poppr")

Installation

From CRAN

Binary versions for mac and windows are available for R ≥ 2.15.1 here.

To install, make sure R is at least version 2.15.1 (the authors recommend ≥ 3.0), and in your console, type:

install.packages("poppr")

If you want the absolute latest version of poppr, see about installing from github below.


Stable and Development versions

To install this package from github, make sure you have the following:

For Linux users, make sure that the function getOption("unzip") returns "unzip" or "internal". If it doesn't, then run options(unzip = "internal").

Once you have devtools and a C compiler installed, you can use the install_github() function to install the current version from github.

Stable version

This release will contain bug fixes and new, documented, and stable features that will be included in future releases. Note: if you don't have LaTeX installed, you should set build_vignettes = FALSE.

devtools::install_github(repo = "grunwaldlab/poppr", build_vignettes = TRUE)
library("poppr")

Unstable/Development versions

All new features in testing will be released on different branches. These features will be in various stages of development and may or may not be documented. Install with caution. The below command would install features on the the branch called "devel". Note that these branches might be out of date from the master branch.

devtools::install_github(repo = "grunwaldlab/poppr@devel", build_vignettes = TRUE)
library("poppr")

Help / Documentation

R documentation

To access a descriptive index of help files in poppr, type in your console:

package?poppr

Vignettes

A few vignettes have been written for poppr:

TitleCommand
Algorightms and Equationsvignette("algo", "poppr")
Data import and manipulationvignette("poppr_manual", "poppr")
Multilocus Genotype Analysisvignette("mlg", "poppr")

User Group

Users who have any questions/comments/suggestions regarding any version of poppr (stable or development) should direct their comments to the Poppr google group

Book/Primer

In Spring of 2014, Dr. Niklaus J. Grünwald, Dr. Sydney E. Everhart and Zhian N. Kamvar wrote a primer for population genetic analysis in R located at http://grunwaldlab.github.io/Population_Genetics_in_R.

Contributing

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. If you wish to contribute code to poppr, please fork the repository and create a pull request with your added feature.

Copy Link

Version

Install

install.packages('poppr')

Monthly Downloads

5,047

Version

2.5.0

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

September 11th, 2017

Functions in poppr (2.5.0)

bitwise.ia

Calculate the index of association between samples in a genlight object.
bootgen-class

Bootgen object
aboot

Calculate a dendrogram with bootstrap support using any distance applicable to genind or genclone objects.
bitwise.dist

Calculate a dissimilarity distance matrix for SNP data.
MLG-class

MLG class
initialize,MLG-method

Methods used for MLG objects
Pinf

Phytophthora infestans data from Mexico and South America.
Pram

Phytophthora ramorum data from OR Forests and Nurseries (OR and CA)
Aeut

Oomycete root rot pathogen Aphanomyces euteiches AFLP data
visible

Accessors for the MLG object
bruvomat-class

bruvomat object
initialize,bruvomat-method

Methods used for the bruvomat object.
clonecorrect

Remove potential bias caused by cloned genotypes in genind or genclone object.
bootgen2genind

Switch between genind and genclone objects.
diversity_boot

Perform a bootstrap analysis on diversity statistics
diversity_ci

Perform bootstrap statistics, calculate, and plot confidence intervals.
bruvo.dist

Bruvo's distance for microsatellites
bruvo.msn

Create minimum spanning network of selected populations using Bruvo's distance.
diversity_stats

Produce a table of diversity statistics
filter_stats

Utilize all algorithms of mlg.filter
greycurve

Display a greyscale gradient adjusted to specific parameters
ia

Index of Association
mll.reset

Reset multilocus lineages
cutoff_predictor

Predict cutoff thresholds for use with mlg.filter
diss.dist

Calculate a distance matrix based on relative dissimilarity
genind2genalex

Exporting data from genind objects to genalex formatted *.csv files.
genotype_curve

Produce a genotype accumulation curve
imsn

Create minimum spanning networks interactively
incomp

Check for samples that are incomparable due to missing data
old2new_genclone

Convert an old genclone object to a new genclone object
partial_clone

Simulated data illustrating a Minimum Spanning Network based on Bruvo's Distance
poppr.plot

Internal function to plot the results from ia() and poppr()
poppr_has_parallel

Determines whether openMP is support on this system.
monpop

Peach brown rot pathogen Monilinia fructicola
poppr

Produce a basic summary table for population genetic analyses.
poppr.all

Process a list of files with poppr
read.genalex

Importing data from genalex formatted *.csv files.
recode_polyploids

Recode polyploid microsatellite data for use in frequency based statistics.
info_table

Create a table summarizing missing data or ploidy information of a genind or genclone object
informloci

Remove all non-phylogentically informative loci
mll

Access and manipulate multilocus lineages.
mll.custom

Define custom multilocus lineages
fix_replen

Find and fix inconsistent repeat lengths
genclone-class

GENclone and SNPclone classes
getfile

Get a file name and path and store them in a list.
%>%

magrittr forward-pipe operator
mlg

Create counts, vectors, and matrices of multilocus genotypes.
test_replen

Test repeat length consistency.
unique,MLG-method

Unique and Duplicated implementations for MLG objects
mlg.filter

MLG definitions based on genetic distance
pgen

Genotype Probability
plot_filter_stats

Plot the results of filter_stats
rraf

Round Robin Allele Frequencies
rrmlg

Round Robin Multilocus Genotypes
poppr.amova

Perform Analysis of Molecular Variance (AMOVA) on genind or genclone objects.
poppr.msn

Create a minimum spanning network of selected populations using a distance matrix.
samp.ia

Calculate random samples of the index of association for genlight objects.
shufflepop

Shuffle individuals in a '>genclone or '>genind object independently over each locus.
as.snpclone

Create a snpclone object from a genlight object.
popsub

Subset data by population
private_alleles

Tabulate alleles the occur in only one population.
win.ia

Calculate windows of the index of association for genlight objects.
[,bootgen,ANY,ANY,ANY-method

Methods used for the bootgen object.
bruvo.boot

Create a tree using Bruvo's Distance with non-parametric bootstrapping.
initialize,genclone-method

Methods used for the genclone object
nei.dist

Calculate Genetic Distance for a genind or genclone object.
is.snpclone

Check for validity of a genclone or snpclone object
levels,MLG-method

Unique and Duplicated implementations for MLG objects
locus_table

Create a table of summary statistics per locus.
missingno

Treat missing data
[,snpclone,ANY,ANY,ANY-method

Methods used for the snpclone object
plot_poppr_msn

Plot minimum spanning networks produced in poppr.
poppr-package

The poppr R package.
psex

Probability of encountering a genotype more than once by chance
rare_allele_correction

Correcting rare allele frequencies