Skip to content

Commit

Permalink
Merge pull request #205 from grunwaldlab/cran-release-2.8.3
Browse files Browse the repository at this point in the history
Cran release 2.8.3
  • Loading branch information
zkamvar authored Jun 18, 2019
2 parents 5ccb0ad + 9d4d701 commit 60eb0e3
Show file tree
Hide file tree
Showing 269 changed files with 1,360 additions and 1,289 deletions.
1 change: 0 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
^vignettes/figure
^tests/testthat/Rplots.pdf
^CODE_OF_CONDUCT\.md$
^NEWS\.md$
^cran-comments\.md$
^docs/*$
^ISSUE_TEMPLATE\.md$
Expand Down
2 changes: 2 additions & 0 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This package was submitted to CRAN on 2019-06-14.
Once it is accepted, delete this file and tag the release (commit a2b31fd4d3).
15 changes: 9 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: poppr
Type: Package
Title: Genetic Analysis of Populations with Mixed Reproduction
Version: 2.8.2.99-13
Date: 2019-05-02
Version: 2.8.3
Date: 2019-06-13
Authors@R: c(person(c("Zhian", "N."), "Kamvar", role = c("cre", "aut"),
email = "[email protected]", comment = c(ORCID = "0000-0003-1458-7108")),
person(c("Javier", "F."), "Tabima", role = "aut",
Expand All @@ -21,15 +21,18 @@ Authors@R: c(person(c("Zhian", "N."), "Kamvar", role = c("cre", "aut"),
email = "[email protected]", comment = c(ORCID = "0000-0002-6395-8107")),
person(c("Frédéric", "D."), "Chevalier", role = "ctb",
email = "[email protected]", comment = c(ORCID = "0000-0003-2611-8106")),
person(c("Niklaus", "J."), "Grunwald", role = "ths",
person(c("Niklaus", "J."), "Grünwald", role = "ths",
email = "[email protected]", comment = c(ORCID = "0000-0003-1656-7602")))
Maintainer: Zhian N. Kamvar <[email protected]>
Encoding: UTF-8
URL: https://github.com/grunwaldlab/poppr,
https://grunwaldlab.github.io/poppr,
URL: https://grunwaldlab.github.io/poppr,
https://github.com/grunwaldlab/poppr,
https://grunwaldlab.github.io/Population_Genetics_in_R/
Description: Population genetic analyses for hierarchical analysis of partially
clonal populations built upon the architecture of the 'adegenet' package.
clonal populations built upon the architecture of the 'adegenet' package.
Originally described in Kamvar, Tabima, and Grünwald (2014)
<doi:10.7717/peerj.281> with version 2.0 described in Kamvar, Brooks, and
Grünwald (2015) <doi:10.3389/fgene.2015.00208>.
MailingList: https://groups.google.com/group/poppr
BugReports: https://github.com/grunwaldlab/poppr/issues
Depends:
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export("%>%")
export("cutoff<-")
export("distalgo<-")
export("distargs<-")
export("distenv<-")
export("distname<-")
export("mlg.filter<-")
export("mll.custom<-")
Expand All @@ -35,6 +36,7 @@ export(cutoff_predictor)
export(diss.dist)
export(distalgo)
export(distargs)
export(distenv)
export(distname)
export(diversity_boot)
export(diversity_ci)
Expand Down
23 changes: 19 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
poppr 2.8.2.99
poppr 2.8.3
===========

BUG FIX
=======
-------

* `read.genalex()` now correctly parses strata when the user imports data that
contains duplicated data AND has some individuals named as integers less than
the number of samples in the data (prepended by zeroes)
(See https://github.com/grunwaldlab/poppr/pull/202).

MISC
====
NEW FEATURES
------------

* MSN functions: nodes with single populations displayed as circles instead of
pies. (@fdchevalier, https://github.com/grunwaldlab/poppr/pull/203)

MISC
----

* `mlg.vector()` is now safer as it now uses a for loop instead of a
function with the out-of-scope operator (`<<-`) (see #205)
* `shufflepop()` is now safer as it now uses a for loop instead of a
function with the out-of-scope operator (`<<-`) (see #205)
* The MLG class gains a new `distenv` slot, which will store the environment
where the distance function or matrix exists. This is accompanied by an
accessor of the same name (see #206).
* `"mlg.filter<-"()` replacement methods will no longer search the global
environment when evaluating the distance function or matrix (see #206).
* Tests for `mlg.filter()` no longer assign objects to the global environment
* DOIs for the publications have been added to the DESCRIPTION

poppr 2.8.2
===========

Expand Down
5 changes: 1 addition & 4 deletions R/Index_calculations.r
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,8 @@ poppr <- function(dat, total = TRUE, sublist = "ALL", blacklist = NULL,
#' # Obtain a list of fstat files from a directory.
#' x <- getfile(multi=TRUE, pattern="^.+?dat$")
#'
#' # set the working directory to that directory.
#' setwd(x$path)
#'
#' # run the analysis on each file.
#' poppr.all(x$files)
#' poppr.all(file.path(x$path, x$files))
#' }
#==============================================================================#
poppr.all <- function(filelist, ...){
Expand Down
5 changes: 4 additions & 1 deletion R/aaaMLGclass.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ setClassUnion("charORLang", c("character", "language"))
#' accessed.
#' @slot distname the name of the distance function or matrix used to collapse
#' mlgs.
#' @slot distenv the environment that contains the distance function or matrix
#' @slot distargs the arguments provided to compute the distance function.
#' @slot distalgo the algorithm used to contract multilocus genotypes.
#' @slot cutoff Two numbers specifying the cutoff value for expanding and
Expand Down Expand Up @@ -97,12 +98,14 @@ setClass("MLG",
representation(visible = "character",
cutoff = "numeric",
distname = "charORLang",
distenv = "environment",
distargs = "list",
distalgo = "character",
mlg = "data.frame"),
prototype(visible = character(0),
cutoff = numeric(0),
distname = character(0),
distenv = as.environment(.GlobalEnv),
distargs = list(),
distalgo = "farthest_neighbor",
mlg = data.frame(expanded = numeric(0),
Expand All @@ -111,4 +114,4 @@ setClass("MLG",
custom = factor(character(0))
)
)
)
)
36 changes: 35 additions & 1 deletion R/aaaMLGmethods.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ setMethod(
slot(.Object, "mlg") <- mlg
slot(.Object, "visible") <- "original"
slot(.Object, "distname") <- "diss.dist"
slot(.Object, "distenv") <- .GlobalEnv
slot(.Object, "distargs") <- list()
slot(.Object, "distalgo") <- "farthest_neighbor"
return(.Object)
Expand Down Expand Up @@ -444,6 +445,22 @@ setMethod(
x@distname
})

#==============================================================================#
#' @rdname MLG-accessors
#' @aliases distenv,MLG-method
#' @export
#==============================================================================#
setGeneric("distenv", function(x) {
standardGeneric("distenv")
})

setMethod(
f = "distenv",
signature(x = "MLG"),
definition = function(x) {
x@distenv
})

#==============================================================================#
#' @rdname MLG-accessors
#' @aliases distname<-,MLG-method
Expand All @@ -461,6 +478,23 @@ setMethod(
return(x)
})

#==============================================================================#
#' @rdname MLG-accessors
#' @aliases distenv<-,MLG-method
#' @export
#==============================================================================#
setGeneric("distenv<-", function(x, value) {
standardGeneric("distenv<-")
})

setMethod(
f = "distenv<-",
signature(x = "MLG"),
definition = function(x, value) {
x@distenv <- value
return(x)
})

#==============================================================================#
#' @rdname MLG-accessors
#' @aliases distargs,MLG-method
Expand Down Expand Up @@ -560,4 +594,4 @@ setMethod(
definition = function(x, value) {
x@cutoff <- value
return(x)
})
})
3 changes: 0 additions & 3 deletions R/file_handling.r
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@
#'
#' yfiles <- poppr.all(y$files)
#'
#' # Write results to a file in that directory.
#' setwd(y$path)
#' write.csv(yfiles)
#' }
#' @export
#==============================================================================#
Expand Down
Loading

0 comments on commit 60eb0e3

Please sign in to comment.