diff --git a/DESCRIPTION b/DESCRIPTION index 0119de9c..e2cd7099 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: AlphaSimR Type: Package Title: Breeding Program Simulations -Version: 1.5.2 -Date: 2023-10-31 +Version: 1.5.3 +Date: 2023-11-30 Authors@R: c(person("Chris", "Gaynor", email = "gaynor.robert@hotmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0558-6656")), person("Gregor", "Gorjanc", role = "ctb", diff --git a/NEWS.md b/NEWS.md index 0ee54e3a..9a73d75a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# AlphaSimR 1.5.3 + +*fixed bug in `SimParam$restrSegSites` with excluding sites at end of chromosome + # AlphaSimR 1.5.2 *fix SimParam examples for CRAN diff --git a/R/Class-SimParam.R b/R/Class-SimParam.R index e808cbd7..33549cad 100644 --- a/R/Class-SimParam.R +++ b/R/Class-SimParam.R @@ -2235,7 +2235,7 @@ SimParam = R6Class( cumSumSegSite = cumsum(private$.segSites) for(i in take){ # Identify chromosome - chr = findInterval(i, cumSumSegSite) + 1L + chr = findInterval(i, cumSumSegSite, left.open = TRUE) + 1L # Identify position if(chr>1L){