Skip to content

Commit

Permalink
preparing to release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gaynorr committed Aug 24, 2022
1 parent 16f2caf commit bfe4adc
Show file tree
Hide file tree
Showing 27 changed files with 515 additions and 415 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: AlphaSimR
Type: Package
Title: Breeding Program Simulations
Version: 1.2.2.9990
Date: 2022-8-23
Version: 1.3.0
Date: 2022-8-24
Authors@R: c(person("Chris", "Gaynor", email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0558-6656")),
person("Gregor", "Gorjanc", role = "ctb",
Expand Down Expand Up @@ -32,7 +32,8 @@ URL: https://github.com/gaynorr/AlphaSimR,
https://www.edx.org/course/breeding-programme-modelling-with-alphasimr?utm_source=breeding_alphasimr&utm_medium=partner-marketing&utm_campaign=edinburghx
Encoding: UTF-8
Depends: R (>= 4.0.0), methods, R6
Imports: Rcpp (>= 0.12.7)
Imports: Rcpp (>= 0.12.7), Rdpack
RdMacros: Rdpack
LinkingTo: Rcpp, RcppArmadillo (>= 0.7.500.0.0), BH
RoxygenNote: 7.2.1
Suggests: knitr, rmarkdown, testthat
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ exportClasses(TraitAEG)
exportClasses(TraitAG)
import(Rcpp)
importFrom(R6,R6Class)
importFrom(Rdpack,reprompt)
importFrom(methods,.hasSlot)
importFrom(methods,classLabel)
importFrom(methods,is)
Expand Down
16 changes: 12 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
# AlphaSimR 1.2.2.9990
# AlphaSimR 1.3.0

*added ability to exclude loci by name in `SimParam$restrSegSites`

*`pullMarkerGeno` and `pullMarkerHaplo` now work with a MapPop class

*added `setMarkerHaplo` to manually change genotypes in a Pop or MapPop

*add `addSegSite` for manually adding segregating sites to a MapPop class
*added `addSegSite` for manually adding segregating sites to a MapPop class

*`simParam$setCorE` has been deprecated in favor of a corE argument in `simParam$setVarE`

*`setPheno` now takes corE as an argument

*`setPheno` now allows the user to set phenotypes for a subset of traits

*add `newEmptyPop` to create populations with zero individuals

*removed reps slot from populations and heterogeneous residual variance GS models

*added h2, H2, and corE to `setPhenoGCA` and `setPhenoProgTest`

*the "EUROPEAN" species history was removed from `runMacs` due to lengthy runtime

# AlphaSimR 1.2.2

*added `getPed` to quick extract a population's pedigree
Expand Down Expand Up @@ -48,7 +56,7 @@

# AlphaSimR 1.1.1

*removed use of PI variable in C++ code which is compiler specific
*removed use of PI variable in C++ code due to it being compiler specific

# AlphaSimR 1.1.0

Expand Down Expand Up @@ -90,7 +98,7 @@

*changed to a Gamma Sprinkling model for crossovers, default is still a Gamma model

*change default interfernce parameter (v) to 2.6 to be consistent with the Kosambi mapping function (was 1, consistent with the Haldane mapping function)
*change default interference parameter (v) to 2.6 to be consistent with the Kosambi mapping function (was 1, consistent with the Haldane mapping function)

*new internal id (iid) that allows user to freely change id slot in populations

Expand Down
1 change: 1 addition & 0 deletions R/AlphaSimR.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' @importFrom stats model.matrix rbinom runif cov2cor
#' @importFrom utils combn read.table write.table packageDescription
#' @importFrom R6 R6Class
#' @importFrom Rdpack reprompt

#' @description
#' The successor to the 'AlphaSim' software for breeding program
Expand Down
10 changes: 0 additions & 10 deletions R/Class-Pop.R
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@ isNamedMapPop = function(x) {
#' @slot gxe list containing GxE slopes for GxE traits
#' @slot fixEff a fixed effect relating to the phenotype.
#' Used by genomic selection models but otherwise ignored.
#' @slot reps the number of replications used to measure the
#' phenotype. Used by genomic selection models, but otherwise ignored.
#' @slot misc a list whose elements correspond to individuals in the
#' population. This list is normally empty and exists solely as an
#' open slot available for uses to store extra information about
Expand All @@ -395,7 +393,6 @@ setClass("Pop",
ebv="matrix",
gxe="list",
fixEff="integer",
reps="numeric",
misc="list"),
contains="RawPop")

Expand Down Expand Up @@ -455,9 +452,6 @@ setValidity("Pop",function(object){
if(object@nInd!=length(object@fixEff)){
errors = c(errors,"nInd!=length(fixEff)")
}
if(object@nInd!=length(object@reps)){
errors = c(errors,"nInd!=length(reps)")
}
if(object@nInd!=length(object@misc)){
errors = c(errors,"nInd!=length(misc)")
}
Expand Down Expand Up @@ -490,7 +484,6 @@ setMethod("[",
x@mother = x@mother[i]
x@father = x@father[i]
x@fixEff = x@fixEff[i]
x@reps = x@reps[i]
x@misc = x@misc[i]
x@gv = x@gv[i,,drop=FALSE]
x@pheno = x@pheno[i,,drop=FALSE]
Expand Down Expand Up @@ -692,7 +685,6 @@ newPop = function(rawPop,simParam=NULL,...){
mother=mother,
father=father,
fixEff=rep(1L,rawPop@nInd),
reps=rep(1,rawPop@nInd),
nTraits=simParam$nTraits,
gv=gv,
gxe=gxe,
Expand Down Expand Up @@ -764,7 +756,6 @@ resetPop = function(pop,simParam=NULL){
pop@gv = matrix(NA_real_,nrow=pop@nInd,
ncol=simParam$nTraits)
pop@fixEff = rep(1L,pop@nInd)
pop@reps = rep(1,pop@nInd)
if(simParam$nTraits>=1){
for(i in 1:simParam$nTraits){
tmp = getGv(simParam$traits[[i]],pop,simParam$nThreads)
Expand Down Expand Up @@ -870,7 +861,6 @@ newEmptyPop = function(ploidy=2L, simParam=NULL){
mother = character(),
father = character(),
fixEff = integer(),
reps = integer(),
nTraits = simParam$nTraits,
gv = traitMat,
gxe = vector("list", simParam$nTraits),
Expand Down
Loading

0 comments on commit bfe4adc

Please sign in to comment.