How to use and cite popprxl

Zhian N. Kamvar and Niklaus J. Grünwald

2018-05-17

Citing popprxl

This package is a wrapper for poppr and readxl. When using this package, please cite the poppr package:

citation(package = "poppr")
## 
## To cite poppr in publications or presentations, please specify
## poppr version 2.7.1.99-85 and with the following citation:
## 
##   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. doi:
##   10.7717/peerj.281
## 
##   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
## 
## To see these entries in BibTeX format, use 'print(<citation>,
## bibtex=TRUE)', 'toBibtex(.)', or set
## 'options(citation.bibtex.max=999)'.

Using popprxl

There is only one function in popprxl: read.genalexcel(). This allows you to read GenAlEx formatted excel files in .xlsx or .xls format.

Here’s an example using the nancycats data set from the adegenet package.

Note: The system.file() command is a way to access files that come with a package. You will need to supply the path to your own excel file.

library("popprxl")
## Loading required package: poppr
## Loading required package: adegenet
## Loading required package: ade4
## 
##    /// adegenet 2.1.1 is loaded ////////////
## 
##    > overview: '?adegenet'
##    > tutorials/doc/questions: 'adegenetWeb()' 
##    > bug reports/feature requests: adegenetIssues()
## This is poppr version 2.7.1.99.85. To get started, type package?poppr
## OMP parallel support: available
## 
## This version of poppr is under development.
## If you find any bugs, please report them at https://github.com/grunwaldlab/poppr/issues
## 
## popprxl is loaded. Use read.genalexcel() to read in your data.
(nancyxlsx <- system.file("files/nancycats.xlsx", package = "popprxl"))
## [1] "/private/var/folders/qd/dpdhfsz12wb3c7wz0xdm6dbm0000gn/T/RtmpavMl63/Rinst6b60387f5b2/popprxl/files/nancycats.xlsx"
(nancy    <- read.genalexcel(nancyxlsx))
## 
## This is a genclone object
## -------------------------
## Genotype information:
## 
##    237 original multilocus genotypes 
##    237 diploid individuals
##      9 codominant loci
## 
## Population information:
## 
##      1 stratum - Pop
##     17 populations defined - P01, P02, P03, ..., P15, P16, P17

Because poppr is loaded along with popprxl, you can use any functions in poppr:

info_table(nancy, plot = TRUE)

##           Locus
## Population  fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96 fca37  Mean
##      P01   0.200     .     .     .     .     .     .     .     . 0.022
##      P02       .     .     .     .     .     .     .     .     .     .
##      P03       .     .     .     .     .     .     .     .     .     .
##      P04       .     .     .     .     .     .     .     .     .     .
##      P05       .     .     .     .     .     .     .     .     .     .
##      P06       .     .     .     .     .     .     .     .     .     .
##      P07   0.357     .     .     .     .     .     .     .     . 0.040
##      P08       .     .     .     .     .     .     .     .     .     .
##      P09       .     .     .     .     .     .     .     .     .     .
##      P10       .     .     .     .     .     .     .     .     .     .
##      P11   0.150     .     . 0.400     .     .     . 0.050     . 0.067
##      P12   0.214     .     .     .     .     .     .     .     . 0.024
##      P13       .     .     .     .     .     .     .     .     .     .
##      P14   0.412     .     .     .     .     .     .     .     . 0.046
##      P15       .     .     .     .     .     .     .     .     .     .
##      P16       .     .     .     .     .     .     .     .     .     .
##      P17       .     .     . 1.000     .     .     . 0.615     . 0.179
##      Total 0.084     .     . 0.089     .     .     . 0.038     . 0.023