Skip to content

Incorrect number of dimensions with 2 CSD alleles #591

@gregorgorjanc

Description

@gregorgorjanc
set.seed(seed = 1234)
founderGenomes <- quickHaplo(nInd = 4, nChr = 1, segSites = 10)
SP <- SimParamBee$new(founderGenomes, nCsdAlleles = 2)
createVirginQueens(founderGenomes)

gives me

> founderGenomes <- quickHaplo(nInd = 4, nChr = 1, segSites = 10)
> SP <- SimParamBee$new(founderGenomes, nCsdAlleles = 2)
> createVirginQueens(founderGenomes)
Error in x[1, ] : incorrect number of dimensions
> traceback()
6: FUN(X[[i]], ...)
5: lapply(X = X, FUN = FUN, ...)
4: sapply(alleles, FUN = function(x) all(x[1, ] == x[2, ]))
3: editCsdLocus(ret, alleles = csdAlleles, simParamBee = simParamBee)
2: createCastePop(x, caste = "virginQueens", nInd = nInd, year = year, 
       editCsd = editCsd, csdAlleles = csdAlleles, simParamBee = simParamBee, 
       ...)
1: createVirginQueens(founderGenomes)
> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.7.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] SIMplyBee_0.4.1 AlphaSimR_1.6.1 R6_2.5.1       

loaded via a namespace (and not attached):
 [1] compiler_4.3.1    cli_3.6.1         tools_4.3.1      
 [4] rstudioapi_0.15.0 Rcpp_1.0.13       pkgload_1.3.2.1  
 [7] rbibutils_2.3     extraDistr_1.10.0 rlang_1.1.1      
[10] Rdpack_2.6.1     

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions