thierrygosselin / radiator

RADseq Data Exploration, Manipulation and Visualization using R
https://thierrygosselin.github.io/radiator/
GNU General Public License v3.0
58 stars 23 forks source link

genomic converter() Error:>! `everything()` must be used within a *selecting* function. #176

Closed imaa9 closed 1 year ago

imaa9 commented 1 year ago

Hi Thierry,

I am trying to use genomic_converter() to convert a .tsv (produced by STACKS) to into a VCF, and having some problems so I would be grateful for your advice.

As recommended, I checked that radiator recognizes my input files:

library(radiator) library(tidyverse)

radiator::detect_genomic_format(data = "populations.haplotypes.filtered_m80_randomSNP.tsv") [1] "haplo.file"

radiator::summary_strata("grh.strata.tsv") Number of strata: 18
Number of individuals: 61 Number of ind/strata: HMFT = 1 JMW = 5 ABKT = 3 BLKR = 3 WRC = 3 MPGH = 4 DISC = 3 ASHC = 3 CLRM = 5 SLGV = 3 HELL = 5 RBNB = 4 BUFF = 3 STM = 2 MNTB = 2 BLLG = 4 BOSB = 3 MPLH = 5 Number of duplicate id: 0

I then tried to run genomic converter:

require(strataG) my_output <- genomic_converter( data = "populations.haplotypes.filtered_m80_randomSNP.tsv", strata = "grh.strata.tsv", output = c("vcf", "genind"), verbose = TRUE)

with the following output:

################################################################################ ######################### radiator::genomic_converter ########################## ################################################################################ Execution date@time: 20230317@1615 Folder created: 03_radiator_genomic_converter_20230317@1615 Function call and arguments stored in: radiator_genomic_converter_args_20230317@1615.tsv Filters parameters file generated: filters_parameters_20230317@1615.tsv Error:
! everything() must be used within a selecting function. ℹ See ?tidyselect::faq-selection-context for details. Run rlang::last_trace() to see where the error occurred. Computation time, overall: 0 sec ######################### completed genomic_converter ########################## ✖ Importing data: haplo.file [281ms]

I have included my session info and tried to document as well as I could, but please let me know if additional details would be helpful. Any advice you might be able to offer would be greatly appreciated. Thank you kindly, Inbar

session_info()

Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── setting value version R version 4.2.2 (2022-10-31 ucrt) os Windows 10 x64 (build 22621) system x86_64, mingw32 ui RStudio language (EN) collate English_United States.utf8 ctype English_United States.utf8 tz America/New_York date 2023-03-17 rstudio 2022.07.2+576 Spotted Wakerobin (desktop) pandoc NA

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── package version date (UTC) lib source ade4 1.7-22 2023-02-06 [1] CRAN (R 4.2.2) adegenet 2.1.10 2023-01-26 [1] CRAN (R 4.2.2) ape 5.7-1 2023-03-13 [1] CRAN (R 4.2.2) apex 1.0.4 2020-04-11 [1] CRAN (R 4.2.2) bit 4.0.4 2020-08-04 [1] CRAN (R 4.2.1) bit64 4.0.5 2020-08-30 [1] CRAN (R 4.2.1) cachem 1.0.7 2023-02-24 [1] CRAN (R 4.2.2) callr 3.7.1 2022-07-13 [1] CRAN (R 4.2.1) cli 3.6.0 2023-01-09 [1] CRAN (R 4.2.2) cluster 2.1.4 2022-08-22 [2] CRAN (R 4.2.2) codetools 0.2-18 2020-11-04 [2] CRAN (R 4.2.2) colorspace 2.1-0 2023-01-23 [1] CRAN (R 4.2.2) crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.2) curl 4.3.2 2021-06-23 [1] CRAN (R 4.2.1) data.table 1.14.8 2023-02-17 [1] CRAN (R 4.2.2) devtools 2.4.5 2022-10-11 [1] CRAN (R 4.2.2) digest 0.6.31 2022-12-11 [1] CRAN (R 4.2.2) dplyr 1.1.0 2023-01-29 [1] CRAN (R 4.2.2) ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.2.1) fansi 1.0.4 2023-01-22 [1] CRAN (R 4.2.2) fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.2.2) fastmatch 1.1-3 2021-07-23 [1] CRAN (R 4.2.0) forcats 1.0.0 2023-01-29 [1] CRAN (R 4.2.2) fs 1.6.1 2023-02-06 [1] CRAN (R 4.2.2) generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.1) ggplot2 3.4.1 2023-02-10 [1] CRAN (R 4.2.2) glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.1) gtable 0.3.1 2022-09-01 [1] CRAN (R 4.2.2) hms 1.1.2 2022-08-19 [1] CRAN (R 4.2.2) htmltools 0.5.4 2022-12-07 [1] CRAN (R 4.2.2) htmlwidgets 1.5.4 2021-09-08 [1] CRAN (R 4.2.1) httpuv 1.6.9 2023-02-14 [1] CRAN (R 4.2.2) igraph 1.4.1 2023-02-24 [1] CRAN (R 4.2.2) later 1.3.0 2021-08-18 [1] CRAN (R 4.2.1) lattice 0.20-45 2021-09-22 [2] CRAN (R 4.2.2) lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.2) lubridate 1.9.2 2023-02-10 [1] CRAN (R 4.2.2) magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.1) MASS 7.3-58.1 2022-08-03 [2] CRAN (R 4.2.2) Matrix 1.5-1 2022-09-13 [2] CRAN (R 4.2.2) memoise 2.0.1 2021-11-26 [1] CRAN (R 4.2.2) mgcv 1.8-41 2022-10-21 [2] CRAN (R 4.2.2) mime 0.12 2021-09-28 [1] CRAN (R 4.2.0) miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.2.2) munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.1) nlme 3.1-160 2022-10-10 [2] CRAN (R 4.2.2) permute 0.9-7 2022-01-27 [1] CRAN (R 4.2.1) phangorn 2.9.0 2022-06-16 [1] CRAN (R 4.2.1) pillar 1.8.1 2022-08-19 [1] CRAN (R 4.2.2) pkgbuild 1.3.1 2021-12-20 [1] CRAN (R 4.2.1) pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.1) pkgload 1.3.0 2022-06-27 [1] CRAN (R 4.2.1) plyr 1.8.8 2022-11-11 [1] CRAN (R 4.2.2) prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.2.1) processx 3.7.0 2022-07-07 [1] CRAN (R 4.2.1) profvis 0.3.7 2020-11-02 [1] CRAN (R 4.2.2) promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.2.1) ps 1.7.1 2022-06-18 [1] CRAN (R 4.2.1) purrr 1.0.1 2023-01-10 [1] CRAN (R 4.2.2) quadprog 1.5-8 2019-11-20 [1] CRAN (R 4.2.0) R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.1) radiator 1.2.6 2023-03-16 [1] Github (thierrygosselin/radiator@d4f50f4) Rcpp 1.0.10 2023-01-22 [1] CRAN (R 4.2.2) readr 2.1.4 2023-02-10 [1] CRAN (R 4.2.2) remotes 2.4.2 2021-11-30 [1] CRAN (R 4.2.1) reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.2.1) rlang 1.1.0 2023-03-14 [1] CRAN (R 4.2.2) rprojroot 2.0.3 2022-04-02 [1] CRAN (R 4.2.1) rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.2) scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.2) seqinr 4.2-23 2022-11-28 [1] CRAN (R 4.2.2) sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.2) shiny 1.7.4 2022-12-15 [1] CRAN (R 4.2.2) strataG 2.5.01 2023-03-17 [1] Github (ericarcher/strataG@d89348c) stringi 1.7.12 2023-01-11 [1] CRAN (R 4.2.2) stringr 1.5.0 2022-12-02 [1] CRAN (R 4.2.2) tibble 3.2.0 2023-03-08 [1] CRAN (R 4.2.2) tidyr 1.3.0 2023-01-24 [1] CRAN (R 4.2.2) tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.2) tidyverse 2.0.0 2023-02-22 [1] CRAN (R 4.2.2) timechange 0.2.0 2023-01-11 [1] CRAN (R 4.2.2) tzdb 0.3.0 2022-03-28 [1] CRAN (R 4.2.1) urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.2.2) usethis * 2.1.6 2022-05-25 [1] CRAN (R 4.2.2) utf8 1.2.3 2023-01-31 [1] CRAN (R 4.2.2) vctrs 0.6.0 2023-03-16 [1] CRAN (R 4.2.2) vegan 2.6-4 2022-10-11 [1] CRAN (R 4.2.2) vroom 1.6.1 2023-01-22 [1] CRAN (R 4.2.2) withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.1) xtable 1.8-4 2019-04-21 [1] CRAN (R 4.2.1)

thierrygosselin commented 1 year ago

@imaa9 using a tsv file to produce a VCF and/or GENIND file for adegenet won't work. Try using the VCF file produced by the same stacks run and use that instead as input with the strata file. This will work to generate a genind file.