Skip to content

Commit

Permalink
Merge pull request #62 from gaynorr/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
gaynorr committed Jun 15, 2022
2 parents f0ef6ba + 1014c61 commit f0227c2
Show file tree
Hide file tree
Showing 81 changed files with 2,655 additions and 4,973 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
^docs$
^pkgdown$
^\.github$
^revdep$
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
.Rhistory
.RData
.Ruserdata
config.log
config.status
src/*.o
src/*.so
src/*.dll
Notes.txt
Meta
.Rproj.user
alphasimr.Rproj
10 changes: 6 additions & 4 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.1.2
Date: 2022-2-17
Version: 1.2
Date: 2022-5-15
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 All @@ -11,7 +11,9 @@ Authors@R: c(person("Chris", "Gaynor", email = "[email protected]",
comment = c(ORCID = "0000-0001-5675-3974")),
person("Daniel", "Money", role = "ctb",
comment = c(ORCID = "0000-0001-5151-3648")),
person("David", "Wilson", role = "ctb"))
person("David", "Wilson", role = "ctb"),
person("Thiago","Oliveira", role = "ctb",
comment = c(ORCID = "0000-0002-4555-2584")))
Description: The successor to the 'AlphaSim' software for breeding program
simulation [Faux et al. (2016) <doi:10.3835/plantgenome2016.02.0013>].
Used for stochastic simulations of breeding programs to the level of DNA
Expand All @@ -27,7 +29,7 @@ Description: The successor to the 'AlphaSim' software for breeding program
License: MIT + file LICENSE
URL: https://github.com/gaynorr/AlphaSimR
Encoding: UTF-8
Depends: R (>= 3.3.0), methods, R6
Depends: R (>= 4.0.0), methods, R6
Imports: Rcpp (>= 0.12.7)
LinkingTo: Rcpp, RcppArmadillo (>= 0.7.500.0.0), BH
RoxygenNote: 7.1.2
Expand Down
13 changes: 13 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,17 @@ export(genicVarA)
export(genicVarAA)
export(genicVarD)
export(genicVarG)
export(getMisc)
export(getNumThreads)
export(getQtlMap)
export(getSnpMap)
export(gv)
export(hybridCross)
export(importGenMap)
export(importHaplo)
export(importInbredGeno)
export(isFemale)
export(isMale)
export(makeCross)
export(makeCross2)
export(makeDH)
Expand All @@ -47,6 +53,8 @@ export(pedigreeCross)
export(pheno)
export(popVar)
export(pullIbdHaplo)
export(pullMarkerGeno)
export(pullMarkerHaplo)
export(pullQtlGeno)
export(pullQtlHaplo)
export(pullSegSiteGeno)
Expand All @@ -70,6 +78,7 @@ export(selectOP)
export(selectWithinFam)
export(self)
export(setEBV)
export(setMisc)
export(setPheno)
export(setPhenoGCA)
export(setPhenoProgTest)
Expand All @@ -83,6 +92,7 @@ export(solveRRBLUP_EM)
export(solveRRBLUP_EM2)
export(solveRRBLUP_EM3)
export(solveUVM)
export(transMat)
export(usefulness)
export(varA)
export(varAA)
Expand Down Expand Up @@ -119,9 +129,11 @@ importFrom(methods,show)
importFrom(methods,validObject)
importFrom(stats,aggregate)
importFrom(stats,coef)
importFrom(stats,cov2cor)
importFrom(stats,dnorm)
importFrom(stats,lm)
importFrom(stats,model.matrix)
importFrom(stats,na.omit)
importFrom(stats,pnorm)
importFrom(stats,qgamma)
importFrom(stats,qnorm)
Expand All @@ -130,6 +142,7 @@ importFrom(stats,rnorm)
importFrom(stats,runif)
importFrom(stats,var)
importFrom(utils,combn)
importFrom(utils,packageDescription)
importFrom(utils,read.table)
importFrom(utils,write.table)
useDynLib(AlphaSimR, .registration = TRUE)
14 changes: 14 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
Changes in version 1.2.0

New features
-added importGenMap to format genetic maps for AlphaSimR
-added importInbredGeno and importHaplo to make it easier to create a simulation from external data
-added importSnpChip, importTrait to SimParam to make it easier to manually define traits
-added pullMarkerGeno and pullMarkerHaplo to make it easier to extract genotypes and haplotypes of specific loci without defining a trait or SNP chip

Bug fixes
-reduceGenome, mergeGenome and doubleGenome should really now work with pedigree and recombination tracking

Known issues
-pedigreeCross fails without an appropriate warning for some incomplete pedigrees

Changes in version 1.1.2

Bug fixes
Expand Down
8 changes: 4 additions & 4 deletions R/AlphaSimR.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#' @importFrom methods new validObject is .hasSlot
#' @importFrom methods show classLabel
#' @importFrom stats aggregate rnorm qnorm var
#' @importFrom stats coef dnorm lm pnorm qgamma
#' @importFrom stats model.matrix rbinom runif
#' @importFrom utils combn read.table write.table
#' @importFrom stats coef dnorm lm pnorm qgamma na.omit
#' @importFrom stats model.matrix rbinom runif cov2cor
#' @importFrom utils combn read.table write.table packageDescription
#' @importFrom R6 R6Class

#' @description
Expand All @@ -22,7 +22,7 @@
#' for fast simulation of biallelic sequences according to a population
#' demographic history [Chen et al. (2009) <doi:10.1101/gr.083634.108>].
#'
#' Please see the introductionary vignette for instructions for using this package.
#' Please see the introductory vignette for instructions for using this package.
#' The vignette can be viewed using the following command:
#' \code{vignette("intro",package="AlphaSimR")}
#' @keywords internal
Expand Down
3 changes: 1 addition & 2 deletions R/Class-HybridPop.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ setMethod("[",
}
}
}
validObject(x)
return(x)
}
)
Expand All @@ -118,11 +117,11 @@ setMethod("c",
}
}
}
validObject(x)
return(x)
}
)

# Test if object is of a HybridPop class
isHybridPop = function(x) {
ret = is(x, class2 = "HybridPop")
return(ret)
Expand Down
16 changes: 15 additions & 1 deletion R/Class-LociMap.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
#' @slot nLoci total number of loci
#' @slot lociPerChr number of loci per chromosome
#' @slot lociLoc physical position of loci
#' @slot name optional name for LociMap object
#'
#' @export
setClass("LociMap",
slots=c(nLoci="integer",
lociPerChr="integer",
lociLoc="integer"))
lociLoc="integer",
name="character"),
prototype=list(name=NA_character_))

setValidity("LociMap",function(object){
errors = character()
Expand All @@ -31,6 +34,7 @@ setValidity("LociMap",function(object){
}
})

# Test if object is of a LociMap class
isLociMap = function(x) {
ret = is(x, class2 = "LociMap")
return(ret)
Expand Down Expand Up @@ -63,6 +67,7 @@ setValidity("TraitA",function(object){
}
})

# Test if object is of a TraitA class
isTraitA = function(x) {
ret = is(x, class2 = "TraitA")
return(ret)
Expand Down Expand Up @@ -94,6 +99,7 @@ setValidity("TraitA2",function(object){
}
})

# Test if object is of a TraitA2 class
isTraitA2 = function(x) {
ret = is(x, class2 = "TraitA2")
return(ret)
Expand Down Expand Up @@ -127,6 +133,7 @@ setValidity("TraitAE",function(object){
}
})

# Test if object is of a TraitAE class
isTraitAE = function(x) {
ret = is(x, class2 = "TraitAE")
return(ret)
Expand Down Expand Up @@ -157,6 +164,7 @@ setValidity("TraitAD",function(object){
}
})

# Test if object is of a TraitAD class
isTraitAD = function(x) {
ret = is(x, class2 = "TraitAD")
return(ret)
Expand Down Expand Up @@ -187,6 +195,7 @@ setValidity("TraitA2D",function(object){
}
})

# Test if object is of a TraitA2D class
isTraitA2D = function(x) {
ret = is(x, class2 = "TraitA2D")
return(ret)
Expand Down Expand Up @@ -220,6 +229,7 @@ setValidity("TraitADE",function(object){
}
})

# Test if object is of a TraitADE class
isTraitADE = function(x) {
ret = is(x, class2 = "TraitADE")
return(ret)
Expand Down Expand Up @@ -254,6 +264,7 @@ setValidity("TraitAG",function(object){
}
})

# Test if object is of a TraitAG class
isTraitAG = function(x) {
ret = is(x, class2 = "TraitAG")
return(ret)
Expand Down Expand Up @@ -288,6 +299,7 @@ setValidity("TraitAEG",function(object){
}
})

# Test if object is of a TraitAEG class
isTraitAEG = function(x) {
ret = is(x, class2 = "TraitAEG")
return(ret)
Expand Down Expand Up @@ -322,6 +334,7 @@ setValidity("TraitADG",function(object){
}
})

# Test if object is of a TraitADG class
isTraitADG = function(x) {
ret = is(x, class2 = "TraitADG")
return(ret)
Expand Down Expand Up @@ -356,6 +369,7 @@ setValidity("TraitADEG",function(object){
}
})

# Test if object is of a TraitADEG class
isTraitADEG = function(x) {
ret = is(x, class2 = "TraitADEG")
return(ret)
Expand Down
Loading

0 comments on commit f0227c2

Please sign in to comment.