famuvie / breedR

Statistical methods for forest genetic resources analysts
http://famuvie.github.io/breedR/
GNU General Public License v3.0
31 stars 24 forks source link

Error in dimnames(reml$invAI) when running multiple-traits with AI #81

Closed leosanrod closed 7 years ago

leosanrod commented 7 years ago

Error in dimnames(reml$invAI) <- list(comp_names, comp_names) : length of 'dimnames' [1] not equal to array extent 2. parse_results(file.path(tmpdir, "solutions"), effects, mf, reml.out, method, mcout) 1. remlf90(fixed = cbind(h2002, h2003, h2004, circ2015) ~ origine, genetic = list(model = "add_animal", pedigree = data_df[, 1:3], id = "self", var.ini = initial_covs$genetic), data = data_df, var.ini = list(residual = initial_covs$residual), method = "ai")

Equivalent model with option "EM" works. When using EM variance components as seeds in "AI", code breaks with above error.

famuvie commented 7 years ago

sessionInfo()?

Looks like you are running v0.12. Please check and update to v0.12-1 where this was fixed.

leosanrod commented 7 years ago

Yes, that's right. With v0.12., it works.

famuvie commented 7 years ago

Duplicate #80

GreenInnovator commented 5 years ago
res <- remlf90(
  fixed = cbind(A, B) ~ 1,
  genetic = list(
    model = 'add_animal',
    pedigree = num.pedigree$numericPedigree,
    id = "Object"
  ),
  data = dat
)

Using default initial variances given by default_initial_variance() See ?breedR.getOption.

Error in dimnames(ans) <- list(names, names) : length of 'dimnames' [1] not equal to array extent In addition: Warning message: In build_pedigree(1:3, data = ped.df) : The pedigree has been recoded. Check attr(ped, 'map').

famuvie commented 5 years ago

Hi, thanks for reporting. In order to check the issue, I need the outcome from sessionInfo() and some data with which I can reproduce the problem.

GreenInnovator commented 5 years ago

R version 3.5.0 (2018-04-23) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] pedantics_1.7 MCMCglmm_2.26 ape_5.1 MasterBayes_2.55 kinship2_1.6.4 quadprog_1.5-5 Matrix_1.2-14
[8] genetics_1.3.8.1 mvtnorm_1.0-8 MASS_7.3-50 gtools_3.5.0 gdata_2.18.0 combinat_0.0-8 coda_0.19-1
[15] forcats_0.3.0 stringr_1.3.1 dplyr_0.7.5 purrr_0.2.5 readr_1.1.1 tidyr_0.8.1 tibble_1.4.2
[22] tidyverse_1.2.1 ggplot2_2.2.1 asreml_3.0 lattice_0.20-35 breedR_0.12-2 sp_1.3-1 vcfR_1.8.0
[29] adegenet_2.1.1 ade4_1.7-11

loaded via a namespace (and not attached): [1] nlme_3.1-137 lubridate_1.7.4 gmodels_2.18.1 httr_1.3.1 tensorA_0.36 tools_3.5.0 R6_2.2.2
[8] vegan_2.5-2 spData_0.2.9.0 lazyeval_0.2.1 mgcv_1.8-23 colorspace_1.3-2 permute_0.9-4 tidyselect_0.2.4 [15] mnormt_1.5-5 compiler_3.5.0 cli_1.0.0 rvest_0.3.2 expm_0.999-2 xml2_1.2.0 scales_0.5.0
[22] psych_1.8.4 digest_0.6.15 minqa_1.2.4 foreign_0.8-70 pedigreemm_0.3-3 pkgconfig_2.0.1 htmltools_0.3.6
[29] lme4_1.1-17 rlang_0.2.1 readxl_1.1.0 rstudioapi_0.7 shiny_1.1.0 bindr_0.1.1 jsonlite_1.5
[36] spdep_0.7-7 magrittr_1.5 Rcpp_0.12.17 munsell_0.5.0 yaml_2.1.19 stringi_1.2.3 plyr_1.8.4
[43] pinfsc50_1.1.0 parallel_3.5.0 promises_1.0.1 crayon_1.3.4 deldir_0.1-15 haven_1.1.1 splines_3.5.0
[50] hms_0.4.2 pillar_1.2.3 igraph_1.2.1 cubature_1.4 boot_1.3-20 seqinr_3.4-5 corpcor_1.6.9
[57] reshape2_1.4.3 LearnBayes_2.15.1 glue_1.2.0 HaploSim_1.8.4 modelr_0.1.2 nloptr_1.0.4 httpuv_1.4.3
[64] cellranger_1.1.0 gtable_0.2.0 assertthat_0.2.0 mime_0.5 xtable_1.8-2 broom_0.4.4 pedigree_1.4
[71] later_0.7.3 viridisLite_0.3.0 bindrcpp_0.2.2 cluster_2.0.7-1

dat.txt

Initially I thought something went wrong with changing pedigree names to numericals. Why do these need to be numerical?