Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: SIMplyBee
Type: Package
Title: 'AlphaSimR' Extension for Simulating Honeybee Populations and Breeding Programmes
Version: 0.3.0
Version: 0.4.0
Authors@R: c(
person("Jana", "Obšteter", email = "obsteter.jana@gmail.com",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-1511-3916")),
Expand All @@ -26,9 +26,10 @@ URL: https://github.com/HighlanderLab/SIMplyBee
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: methods, R6, stats, utils, extraDistr (>= 1.9.1), RANN
Depends: R (>= 3.3.0), AlphaSimR (>= 1.3.2)
RoxygenNote: 7.2.3
Imports: methods, R6, stats, utils, extraDistr (>= 1.9.1), RANN, Rcpp (>= 0.12.7)
Depends: R (>= 3.3.0), AlphaSimR (>= 1.5.3)
LinkingTo: Rcpp, RcppArmadillo (>= 0.7.500.0.0), BH
RoxygenNote: 7.3.2
Suggests:
rmarkdown,
knitr,
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export(getGv)
export(getIbdHaplo)
export(getId)
export(getLocation)
export(getMisc)
export(getPheno)
export(getPooledGeno)
export(getQtlGeno)
Expand Down Expand Up @@ -191,6 +192,7 @@ export(replaceWorkers)
export(resetEvents)
export(selectColonies)
export(setLocation)
export(setMisc)
export(setQueensYearOfBirth)
export(simulateHoneyBeeGenomes)
export(split)
Expand All @@ -202,6 +204,7 @@ export(swarmPUnif)
exportClasses(Colony)
exportClasses(MultiColony)
import(AlphaSimR)
import(Rcpp)
importFrom(R6,R6Class)
importFrom(extraDistr,rtpois)
importFrom(methods,"slot<-")
Expand All @@ -215,7 +218,10 @@ importFrom(methods,setValidity)
importFrom(methods,show)
importFrom(methods,slot)
importFrom(methods,validObject)
importFrom(stats,na.omit)
importFrom(stats,rbeta)
importFrom(stats,rnorm)
importFrom(stats,rpois)
importFrom(stats,runif)
importFrom(utils,packageVersion)
useDynLib(SIMplyBee, .registration = TRUE)
79 changes: 44 additions & 35 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,67 @@
# SIMplyBee version 0.4.0 #
---
editor_options:
markdown:
wrap: 72
---

* 2023-MM-DD TODO
# SIMplyBee version 0.4.0

## Major changes ##
- 2024-08-23

* createColony() and createMultiColony() do not have the location argument
anymore; use setLocation() instead; by default, location is now c(0, 0) PR#500
## Major changes

* Our website: www.simplybee.info now is fully updated and autoupdates with every Github change
- createColony() and createMultiColony() do not have the location
argument anymore; use setLocation() instead; by default, location is
now c(0, 0) PR#500


## New features ##
- In setLocation(MultiColony) we can set one location (numeric) or
multiple (list or data.frame) PR#500
- getLocation(MultiColony) got the collapse argument
Commit#f4e629c3e8920948ad576eae3615a86b26300790

* In setLocation(MultiColony) we can set one location (numeric) or multiple
(list or data.frame) PR#500

* getLocation(MultiColony) got the collapse argument
Commit#f4e629c3e8920948ad576eae3615a86b26300790
- We can now sample location of a swarm - see sampleLocation and
radius arguments in swarm() PR#500 PR#502

* We can now sample location of a swarm - see sampleLocation and radius
arugments in swarm() PR#500 PR#502

* New function rcircle() to sample a random point within a circle with a given
radius PR#502

* Removed the function createRandomCrossPlan() - that option is now included in the newly added createCrossPlan() fuction
- New function rcircle() to sample a random point within a circle with
a given radius PR#502

* Added the funcionality for spatially-aware mating of honeybee colonies. The new funcionality is included in the createCrossPlan(), that allows to create the cross plan according to the colonies' locations, and in the cross() function, that crosses bees according to their location
- Removed the function createRandomCrossPlan() - that option is now
included in the newly added createCrossPlan() fuction

* Through blood, sweat and tears behind the scenes, we now consistently pass SimParamBee in all functions and test.

- Added the **functionality for spatially-aware mating** of honeybee
colonies. The new functionality is included in the
createCrossPlan(), that allows to create the cross plan according to
the colonies' locations, and in the cross() function, that crosses
bees according to their location. This did not break the old
functionality of the cross function.

- Unified setMisc and getMisc behaviour to comply with the new AlphaSimR behaviour

## Bug fixes ##
* Bug fix - get*Haplo() functions were returning diploid drones when input was a Pop-class
* Bug fix - Honeybee Biology vignette was not recognising founderpop.png during devel::check
- Added new C++ function isHeterozygous() to speed up the SIMplyBee function isCsdHeterozygous()

## Bug fixes

# SIMplyBee version 0.3.0 #
- Bug fix - get\*Haplo() functions were returning diploid drones when
input was a Pop-class

* 2022-12-05 First public/CRAN version of the package
-

## Major changes ##
# SIMplyBee version 0.3.0

* ~2 years of work went into this first public version!
- 2022-12-05 First public/CRAN version of the package

## New features ##

* Many;) See the vignettes and help pages.
## Major changes

## Bug fixes ##
- \~2 years of work went into this first public version!

* Many bugs and issues squashed - see https://github.com/HighlanderLab/SIMplyBee/issues.
Please contribute to the development of this package.
## New features

- Many;) See the vignettes and help pages.

## Bug fixes

- Many bugs and issues squashed - see
<https://github.com/HighlanderLab/SIMplyBee/issues>. Please
contribute to the development of this package.
24 changes: 12 additions & 12 deletions R/Class-Colony.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ setClassUnion("integerOrNumericOrLogicalOrCharacter", c("integer", "numeric", "l
#'
#' @slot id integer, unique ID of the colony
#' @slot location numeric, location of the colony (x, y)
#' @slot queen \code{\link{Pop-class}}, the queen of the colony (we use
#' @slot queen \code{\link[AlphaSimR]{Pop-class}}, the queen of the colony (we use
#' its misc slot for queen's age and drones (fathers) she mated with)
#' @slot virginQueens \code{\link{Pop-class}}, virgin queens of the
#' @slot virginQueens \code{\link[AlphaSimR]{Pop-class}}, virgin queens of the
#' colony
#' @slot drones \code{\link{Pop-class}}, drones of the colony
#' @slot workers \code{\link{Pop-class}}, workers of the colony
#' @slot drones \code{\link[AlphaSimR]{Pop-class}}, drones of the colony
#' @slot workers \code{\link[AlphaSimR]{Pop-class}}, workers of the colony
#' @slot split logical, has colony split
#' @slot swarm logical, has colony swarmed
#' @slot supersedure logical, has colony superseded
#' @slot collapse logical, has colony collapsed
#' @slot production logical, is colony productive
#' @slot misc list, available for storing extra information about the colony
#'
#' @param object \code{\link{Colony-class}}
#' @param x \code{\link{Colony-class}}
#' @param ... \code{NULL}, \code{\link{Colony-class}}, or
#' \code{\link{MultiColony-class}}
#' @param object \code{\link[SIMplyBee]{Colony-class}}
#' @param x \code{\link[SIMplyBee]{Colony-class}}
#' @param ... \code{NULL}, \code{\link[SIMplyBee]{Colony-class}}, or
#' \code{\link[SIMplyBee]{MultiColony-class}}
#'
#' @seealso \code{\link{createColony}}
#' @seealso \code{\link[SIMplyBee]{createColony}}
#'
#' @return \code{\link{Colony-class}} or \code{\link{MultiColony-class}}
#' @return \code{\link[SIMplyBee]{Colony-class}} or \code{\link[SIMplyBee]{MultiColony-class}}
#'
#' @examples
#' founderGenomes <- quickHaplo(nInd = 4, nChr = 1, segSites = 100)
Expand Down Expand Up @@ -157,8 +157,8 @@ setMethod(
#' @rdname combineNULLAndPop
#' @title Combine a NULL and AlphaSimR population
#'
#' @param x NULL or \code{\link{Pop-class}}
#' @param ... list of NULL or \code{\link{Pop-class}} objects
#' @param x NULL or \code{\link[AlphaSimR]{Pop-class}}
#' @param ... list of NULL or \code{\link[AlphaSimR]{Pop-class}} objects
#'
#' @description This combine \code{c()} method is a hack to combine NULL and an
#' AlphaSimR population object \code{c(NULL, pop)} (\code{c(pop, NULL)} works
Expand Down
24 changes: 12 additions & 12 deletions R/Class-MultiColony.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ setClassUnion("integerOrNumericOrLogicalOrCharacter", c("integer", "numeric", "l
#' @description An object holding a collection of honeybee colonies. It behaves
#' like a list.
#'
#' @slot colonies list, a collection of \code{\link{Colony-class}} objects
#' @slot colonies list, a collection of \code{\link[SIMplyBee]{Colony-class}} objects
#'
#' @param object \code{\link{MultiColony-class}}
#' @param x \code{\link{MultiColony-class}}
#' @param object \code{\link[SIMplyBee]{MultiColony-class}}
#' @param x \code{\link[SIMplyBee]{MultiColony-class}}
#' @param i integer, numeric, logical, or character, index or ID to select
#' a colony (see examples)
#' @param j not used
#' @param drop not used
#' @param value \code{\link{Colony-class}} or \code{\link{MultiColony-class}} to
#' @param value \code{\link[SIMplyBee]{Colony-class}} or \code{\link[SIMplyBee]{MultiColony-class}} to
#' assign into \code{x} based on colony index or name \code{i}
#' @param ... \code{NULL}, \code{\link{Colony-class}}, or
#' \code{\link{MultiColony-class}}
#' @param ... \code{NULL}, \code{\link[SIMplyBee]{Colony-class}}, or
#' \code{\link[SIMplyBee]{MultiColony-class}}
#'
#' @seealso \code{\link{createMultiColony}}
#' @seealso \code{\link[SIMplyBee]{createMultiColony}}
#'
#' @return \code{\link{MultiColony-class}} or \code{\link{Colony-class}}
#' @return \code{\link[SIMplyBee]{MultiColony-class}} or \code{\link[SIMplyBee]{Colony-class}}
#'
#' @examples
#' founderGenomes <- quickHaplo(nInd = 10, nChr = 1, segSites = 100)
Expand Down Expand Up @@ -206,7 +206,7 @@ setMethod(
)

# [ ----
#' @describeIn MultiColony-class Extract a colony (one or more!) with an integer/numeric/logical index (position) (return \code{\link{MultiColony-class}})
#' @describeIn MultiColony-class Extract a colony (one or more!) with an integer/numeric/logical index (position) (return \code{\link[SIMplyBee]{MultiColony-class}})
setMethod(
f = "[",
signature(x = "MultiColony", i = "integerOrNumericOrLogical", j = "ANY", drop = "ANY"),
Expand All @@ -217,7 +217,7 @@ setMethod(
}
)

#' @describeIn MultiColony-class Extract a colony (one or more!) with a character ID (name) (return \code{\link{MultiColony-class}})
#' @describeIn MultiColony-class Extract a colony (one or more!) with a character ID (name) (return \code{\link[SIMplyBee]{MultiColony-class}})
setMethod(
f = "[",
signature(x = "MultiColony", i = "character", j = "ANY", drop = "ANY"),
Expand All @@ -230,7 +230,7 @@ setMethod(
)

# [[ ----
#' @describeIn MultiColony-class Extract a colony (just one!) with an integer/numeric/logical index (position) (return \code{\link{Colony-class}})
#' @describeIn MultiColony-class Extract a colony (just one!) with an integer/numeric/logical index (position) (return \code{\link[SIMplyBee]{Colony-class}})
setMethod(
f = "[[",
signature(x = "MultiColony", i = "integerOrNumericOrLogical"),
Expand All @@ -246,7 +246,7 @@ setMethod(
}
)

#' @describeIn MultiColony-class Extract a colony (just one!) with a character ID (name) (return \code{\link{Colony-class}})
#' @describeIn MultiColony-class Extract a colony (just one!) with a character ID (name) (return \code{\link[SIMplyBee]{Colony-class}})
setMethod(
f = "[[",
signature(x = "MultiColony", i = "character"),
Expand Down
Loading