knausb / vcfR

Tools to work with variant call format files
248 stars 54 forks source link

vcfR2tidy() gives me an error: Can't combine `..1$tt` <logical> and `..2$tt` <character>. #162

Closed sridharsh closed 4 years ago

sridharsh commented 4 years ago

rlang::last_trace() <error/vctrs_error_incompatible_type> Can't combine ..1$tt and ..2$tt . Backtrace: █

  1. ├─vcfR::vcfR2tidy(covid_vcf, format_fields = c("GT", "DP"))
  2. │ ├─base::do.call(what = extract_gt_tidy, args = format_dots)
  3. │ └─(function (x, format_fields = NULL, format_types = TRUE, dot_is_NA = TRUE, ...
  4. │ └─vcfR:::guess_types(format_df %>% dplyr::filter(ID %in% format_fields))
  5. │ └─%>%(...)
  6. │ ├─base::withVisible(eval(quote(_fseq(_lhs)), env, env))
  7. │ └─base::eval(quote(_fseq(_lhs)), env, env)
  8. │ └─base::eval(quote(_fseq(_lhs)), env, env)
  9. │ └─vcfR:::_fseq(_lhs)
  10. │ └─magrittr::freduce(value, _function_list)
  11. │ ├─base::withVisible(function_list[k])
  12. │ └─function_list[k]
  13. │ └─dplyr::bind_rows(., tmp)
  14. │ └─vctrs::vec_rbind(!!!dots, .names_to = .id)
  15. └─vctrs::vec_default_ptype2(...)
  16. └─vctrs::stop_incompatible_type(...)
  17. └─vctrs:::stop_incompatible(...)
  18. └─vctrs:::stop_vctrs(...)
caravagn commented 4 years ago

We have the same issue, any chance we can know when this would be solved?

We have vcfR in our production system and might have to switch to other packages if this cannot be solved, or is not planned to be solved anytime soon.

Thanks Giulio

caravagn commented 4 years ago

I forgot to mention that this happened since we updated the vector package vctrs (vctrs_0.3.1) which I think is responsible for automatic type cohersion required by vcfR.

Part of the sessionInfo()


[1] vctrs_0.3.1 vcfR_1.10.0 dplyr_1.0.0
loaded via a namespace (and not attached):
 [1] pinfsc50_1.2.0    Rcpp_1.0.4.6      compiler_3.6.1    pillar_1.4.4     
 [5] tools_3.6.1       lifecycle_0.2.0   tibble_3.0.1      nlme_3.1-148     
 [9] lattice_0.20-41   viridisLite_0.3.0 mgcv_1.8-31       pkgconfig_2.0.3  
[13] rlang_0.4.6       Matrix_1.2-18     cli_2.0.2         parallel_3.6.1   
[17] cluster_2.1.0     generics_0.0.2    grid_3.6.1        tidyselect_1.1.0 
[21] glue_1.4.1        R6_2.4.1          fansi_0.4.1       purrr_0.3.4      
[25] tidyr_1.1.0       magrittr_1.5      ellipsis_0.3.1    MASS_7.3-51.6    
[29] splines_3.6.1     assertthat_0.2.1  memuse_4.1-0      permute_0.9-5    
[33] ape_5.4           utf8_1.1.4        stringi_1.4.6     crayon_1.3.4     
[37] vegan_2.5-6 ```
padpadpadpad commented 4 years ago

Hi all. Interested in what version you are using here?

If you manage to install v1.1.0 this error does not occur (at least for me it doesn't on macOS and R v4). To install this you have to overcome 160 though. I did this by installing checkbashisms but it looks like you can do it by editing the configure file and someone has filed a PR that should work.

fanavarro commented 4 years ago

Hi, same here. We have been using this library in our conda environment without any problem. However, we had to update some packages and now we are getting this error.

This error was discussed in this issue. It looks like to be related to R version 4. In theory, this was fixed in vcfR 1.11.0, but this version is not available from conda and we are having problems with manual installation.

Will the version 1.11.0 be available in conda?

Kind regards, and thanks for your work.

knausb commented 4 years ago

This appears to be an issue with old versions of vcfR. I have just now submitted vcfR 1.12.0 to CRAN and am hoping we'll be back there shortly.

@fanavarro I do not know anything about conda. I appreciate that they've included vcfR. But to my knowledge I have no say in if they include vcfR or which version they may include. Sounds like something you'll need to bring up with the conda folks.