Learn R Programming

poppr (version 1.1.5)

poppr-package: The poppr R package.

Description

Poppr provides tools for population genetic analysis that include genotypic diveristy measures, genetic distances with bootstrap support, native organization and handling of population hierarchies, and clone correction.

To cite poppr, please use citation("poppr"). When referring to poppr in your manuscript, please use lower case unless it occurs at the beginning of a sentence.

Arguments

Data import/export

  • getfile- Provides a quick GUI to grab files for import
  • read.genalex- Read GenAlEx formatted csv files to a genind object
  • genind2genalex- Converts genind objects to GenAlEx formatted csv files

Data manipulation

  • as.genclone- Converts genind objects to genclone objects
  • setpop- Set the population using defined hierarchies
  • splithierarchy- Split a concatenated hierarchy imported as a population
  • sethierarchy- Define a population hierarchy of a genclone object
  • gethierarchy- Extract the hierarchy data frame
  • addhierarchy- Add a vector or data frame to an existing hierarchy
  • namehierarchy- Rename a population hierarchy
  • missingno- Handles missing data
  • clonecorrect- Clone censors at a specified population hierarchy
  • informloci- Detects and removes phylogenetically uninformative loci
  • popsub- Subsets genind objects by population
  • shufflepop- Shuffles genotypes at each locus using four different shuffling algorithms
  • recode_polyploids- Recode polyploid data sets with missing alleles imported as "0"

Genetic distances

Bootstrapping

  • aboot- Creates a bootstrapped dendrogram for any distance measure
  • bruvo.boot- Produces dendrograms with bootstrap support based on Bruvo's distance

Analysis

  • poppr.amova- Analysis of Molecular Variance (as implemented in ade4)
  • ia- Calculates the index of association
  • mlg- Calculates the number of multilocus genotypes
  • mlg.crosspop- Finds all multilocus genotypes that cross populations
  • mlg.table- Returns a table of populations by multilocus genotypes
  • mlg.vector- Returns a vector of a numeric multilocus genotype assignment for each individual
  • mlg.id- Finds all individuals associated with a single multilocus genotype
  • poppr- Returns a diversity table by population
  • poppr.all- Returns a diversity table by population for all compatible files specified
  • private_alleles- Tabulates the occurences of alleles that only occur in one population.
  • locus_table- Creates a table of summary statistics per locus.

Visulalization

  • plot_poppr_msn- Plots minimum spanning networks produced in poppr with scale bar and legend
  • greycurve- Helper to determine the appropriate parameters for adjusting the grey level for msn functions
  • bruvo.msn- Produces minimum spanning networks based off Bruvo's distance colored by population
  • poppr.msn- Produces a minimum spanning network for any pairwise distance matrix related to the data
  • info_table- Creates a heatmap representing missing data or observed ploidy
  • genotype_curve- Creates a series of boxplots to demonstrate how many markers are needed to represent the diversity of your data.

Details

This package relies on the adegenet package. It was built around the genind object, which stores genetic information in a table of allele frequencies. Poppr has extended this object into a new object called genclone. This object tracks clones and organizes different population hierarchical levels.

Documentation{ Documentation is available for any function by typing ?function_name in the R console. Essential functions for manipulating data are detailed within the Data import and manipulation vignette (vignette("poppr_manual", package = "poppr")) and details on algorithms used in poppr are within the Algorithms and equations vignette (vignette("algo", package = "poppr")). Examples of analyses are available in a primer written by Niklaus J. Grünwald, Zhian N. Kamvar, and Sydney E. Everhart at http://grunwaldlab.github.io/Population_Genetics_in_R.}

Getting help{ If you have a specific question or issue with poppr, feel free to contribute to the google group at https://groups.google.com/forum/#!forum/poppr. If you find a bug and are a github user, you can submit bug reports at https://github.com/grunwaldlab/poppr/issues. Otherwise, leave a message on the groups.}

Below are descriptions and links to functions found in poppr. Be aware that all functions in adegenet are also available.

References

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