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: Can't subset columns that don't exist. #111

Closed camoreau closed 1 year ago

camoreau commented 3 years ago

Hello Thierry,

I am running into a similar error as the one discussed in issue #103 One of the final steps, genomic converter, grings this error:

Transferring data to genomic converter... Calibrating REF/ALT alleles... Synchronizing data and strata... Number of strata: 2 Number of individuals: 96

Writing tidy data set: radiator_data_20210114@1458.rad Calibrating REF/ALT alleles... Error: Can't subset columns that don't exist. x Column GT_VCF doesn't exist. Run rlang::last_error() to see where the error occurred. In addition: There were 50 or more warnings (use warnings() to see the first 50)

Computation time, overall: 766 sec ############################# completed filter_rad #############################

rlang::last_error() <error/vctrs_error_subscript_oob> Can't subset columns that don't exist. x Column GT_VCF doesn't exist. Backtrace:

  1. radiator::filter_rad(...)
  2. radiator::genomic_converter(...)
  3. radiator::write_vcf(data = input, filename = filename)
  4. dplyr:::select.data.frame(.data = data, MARKERS, GT_VCF)
  5. tidyselect::eval_select(expr(c(...)), .data)
  6. tidyselect:::eval_select_impl(...)
  7. tidyselect:::vars_select_eval(...)
  8. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
  9. tidyselect:::eval_c(expr, data_mask, context_mask)
  10. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
  11. tidyselect:::walk_data_tree(new, data_mask, context_mask)
  12. tidyselect:::as_indices_sel_impl(...)
  13. tidyselect:::as_indices_impl(x, vars, strict = strict)
  14. tidyselect:::chr_as_locations(x, vars)
  15. vctrs::vec_as_location(x, n = length(vars), names = vars)
  16. vctrs:::stop_subscript_oob(...)
  17. vctrs:::stop_subscript(...) Run rlang::last_trace() to see the full context.

I used this command

detect_genomic_format(here("R_Bathy/Bathybiaster_SNP.vcf")) denovo_01 <- radiator::filter_rad( data = here("R_Bathy/Bathybiaster_SNP.vcf"), strata = here("R_Bathy/popmap_113_bathy.tsv"), output = "vcf", filename = "denovo_1", parallel.core = 1L )

The output of devtools::session_info() is:

devtools::session_info()

I attached the datasets in .zip file R_Bathy.zip

Hope this can help solving this issue.

All the best

thierrygosselin commented 3 years ago

Sorry about that, thanks for following the guidelines for reproducibility, it will be easier to fix today on my end. Best Thierry

gubrins commented 3 years ago

I'm having the same issue, any idea why this is happening?

Regards, Gabriel

jbruxaux commented 3 years ago

Hi!

I got a related issue using write_structure on a tidy object I had created from a vcf, with this error message

Error: Can't subset columns that don't exist. x Column GT doesn't exist.

I solved it by renaming my tidy object column names from GT_BIN to GT and it worked.

Hope it helps someone!

gubrins commented 3 years ago

Hi,

Yes, in fact I did that and it worked, but I was not sure if it was a good thing to do. Did you obtain the same results? Is it compatible?

Thanks!

gubrins commented 3 years ago

In fact, my error message says GT_VCF doesn't exist, but I solved it the same way

PeiwenLi commented 3 years ago

Hi! I ran into a similar error when running :

genomic_converter(GENLIGHT411ind_3,output = "genlight",filename = "GENLIGHT411indv_3", 
                                    filter.common.markers = TRUE,
                                    filter.monomorphic = TRUE)
Importing data: genlight
Calibrating REF/ALT alleles...
Error: Can't rename columns that don't exist.
x Column `ALT` doesn't exist.
Run `rlang::last_error()` to see where the error occurred.

I am running radiator_1.1.9 on R 4.0.2 on a Mac OS11.1

Sincere thanks, Peiwen

Kallan-Cr commented 3 years ago

Hi @thierrygosselin,

I've the same issue then @PeiwenLi :

` genomic_converter(gi.sax, output = "vcf", filename="rad7k", filter.common.markers=F) ################################################################################ ######################### radiator::genomic_converter ########################## ################################################################################ Execution date@time: 20210420@1601 Folder created: 02_radiator_genomic_converter_20210420@1601 Function call and arguments stored in: radiator_genomic_converter_args_20210420@1601.tsv Filters parameters file generated: filters_parameters_20210420@1601.tsv

Importing data: genlight Calibrating REF/ALT alleles... Erreur : Can't rename columns that don't exist. x Column ALT doesn't exist. Run rlang::last_error() to see where the error occurred.Computation time, overall: 4 sec ######################### completed genomic_converter ########################## `

I've also try with a genind object and I've an other issue :

`genomic_converter(gi.sax1, output = "vcf", filename="rad7k", filter.common.markers=F) ################################################################################ ######################### radiator::genomic_converter ########################## ################################################################################ Execution date@time: 20210420@1601 Folder created: 01_radiator_genomic_converter_20210420@1601 Function call and arguments stored in: radiator_genomic_converter_args_20210420@1601.tsv Filters parameters file generated: filters_parameters_20210420@1601.tsv

Importing data: genind Alleles names for each markers will be converted to factors and padded with 0 Calibrating REF/ALT alleles...

Note: more than 2 types of alleles/nucleotides detected artifact/biological ? run radiator::detect_biallelic_problem for more details Error in if (detect.gt == "GT_VCF_NUC") { : l'argument est de longueur nulle

Computation time, overall: 19 sec ######################### completed genomic_converter ##########################`

In both case I've just two empty tsv files and the genomic_converter function fail. I've try this on macOS (10.14.6) and on Windows 10 (v.1909) with R 4.0.5 and Radiator 1.1.9.

All the best, Kallan

aabpaola commented 3 years ago

Hi, I have an issue with radiator. When I try read a vcf I get an following error.

BLTteste <- genomic_converter(data = "BLT2021_filtered_within_ld.vcf", strata = NULL, Execution date@time: 20210519@1646 Folder created: 09_radiator_genomic_converter_20210519@1646 Function call and arguments stored in: radiator_genomic_converter_args_20210519@1646.tsv Filters parameters file generated: filters_parameters_20210519@1646.tsv

Importing data: vcf.file

Reading VCF...

Data summary: number of samples: 49 number of markers: 2597

Filter monomorphic markers Number of individuals / strata / chrom / locus / SNP: Blacklisted: 0 / 0 / 0 / 0 / 0 Filter common markers: only 1 strata, returning data

Generating individual stats... Generating markers stats... [==================================================] 100%, completed, 0s [==================================================] 100%, completed, 1s

Number of chromosome/contig/scaffold: 1 Number of locus: 2597 Number of markers: 2597 Number of strata: 1 Number of individuals: 49

Number of ind/strata: 1pop = 49

Number of duplicate id: 0 radiator Genomic Data Structure (GDS) file: radiator_20210519@1646.gds

Genotypes formats generated with 2597 SNPs: GT_BIN (the dosage of ALT allele: 0, 1, 2 NA): TRUE GT_VCF (the genotype coding VCFs: 0/0, 0/1, 1/1, ./.): TRUE GT_VCF_NUC (the genotype coding in VCFs, but with nucleotides: A/C, ./.): TRUE GT (the genotype coding 'a la genepop': 001002, 001001, 000000): TRUE Error: Problem with mutate() column ALLELE_REF_DEPTH. i ALLELE_REF_DEPTH = dplyr::case_when(...). x objeto 'REF' no encontrado Run rlang::last_error() to see where the error occurred.

Computation time, overall: 29 sec

Computation time, overall: 30 sec output = c("bayescan"), filename="BLTteste.geste",parallel.core = 1L)

I am not getting the output .geno file

Could someone help me to solve this problem?

thierrygosselin commented 3 years ago

Should be fixed with latest release

@camoreau contact me by email I have a couple of questions concerning your sea star dataset. cheers

thierrygosselin commented 3 years ago

@jbruxaux @camoreau @aabpaola @Kallan-Cr @gubrins @PeiwenLi

Renaming the tidy object column from GT_BIN to GT will just lead to bad bad bad results because they are very different format. GT_BIN is my internal coding for genotypes that are based on dosage of the alternate allele, while GT is the internal name for genotypes in genpop format (with 6 digits, 3 per allele, similar to this: 001002).

Use latest GitHub release please.

NoeBarthelemy commented 2 years ago

Hello Thierry,

I'm having the same issues when using a Strata file (that used to work!) when converting a VCF to genpop. I removed the package and reinstalled from github, with no change!

Best wishes, Noé

thierrygosselin commented 2 years ago

Hi Noé, do you mind sharing the script and files (over email) so that I can reproduce the bug. Thanks

NoeBarthelemy commented 2 years ago

Hi Thierry,

Sorry for the inconvenience, I realised now that the function doesn't read csv files properly, which is probably why the column "INDIVIDUALS" couldn't be found. Many thanks for the rapidity of your answer though, and thanks for all the work on this package!

Best wishes, Noé


De : Thierry Gosselin @.> Envoyé : mardi 11 janvier 2022 21:13 À : thierrygosselin/radiator @.> Cc : NoeBarthelemy @.>; Comment @.> Objet : Re: [thierrygosselin/radiator] Genomic converter. Error: Can't subset columns that don't exist. (#111)

Hi Noé, do you mind sharing the script and files (over email) so that I can reproduce the bug. Thanks

— Reply to this email directly, view it on GitHubhttps://github.com/thierrygosselin/radiator/issues/111#issuecomment-1010324064, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUA7YVK3YTAU227OL56CGTUVSFQHANCNFSM4WCPRV5Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.***>

gclongo commented 2 years ago

Hi Thierry,

I ran into similar issues running this command: genomic_converter(hake_sans_SS_MAC5_genind, output = "pcadapt")

################################################################################ ######################### radiator::genomic_converter ########################## ################################################################################ Execution date@time: 20220131@1554 Folder created: 01_radiator_genomic_converter_20220131@1554 Function call and arguments stored in: radiator_genomic_converter_args_20220131@1554.tsv Filters parameters file generated: filters_parameters_20220131@1554.tsv

Importing data: genind Alleles names for each markers will be converted to factors and padded with 0

Writing tidy data set: radiator_data_20220131@1554.rad

Preparing data for output

Scanning for number of alleles per marker... Data is bi-allelic Generating pcadapt file and object Generating pcadapt file... ################################################################################ ####################### radiator::filter_common_markers ######################## ################################################################################ Execution date@time: 20220131@1601 The separator specified is not valid Scanning for common markers...

Computation time, overall: 3 sec ####################### completed filter_common_markers ######################## ################################################################################ ######################### radiator::filter_monomorphic ######################### ################################################################################ Execution date@time: 20220131@1601 Scanning for monomorphic markers...

Computation time, overall: 2 sec ######################### completed filter_monomorphic #########################

Generating automatically 3 new genotypes formats, see doc... Format(s) chosen requires nucleotide information not found in the data 001 converted to A 002 converted to C 003 converted to G 004 converted to T Error: Contact author problem with genotype format used Run rlang::last_error() to see where the error occurred. In addition: Warning message: Unknown or uninitialised column: POP_ID.

Computation time, overall: 409 sec ######################### completed genomic_converter ##########################

The out of devtools::session_info()

─ Session info ───────────────────────────────────────────────────────────────────────────────── setting value
version R version 3.6.2 (2019-12-12) os macOS Catalina 10.15.7
system x86_64, darwin15.6.0
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/Los_Angeles
date 2022-01-31

─ Packages ───────────────────────────────────────────────────────────────────────────────────── package version date lib source
ade4
1.7-18 2021-09-16 [1] CRAN (R 3.6.2)
adegenet 2.1.5 2021-10-09 [1] CRAN (R 3.6.2)
ape 5.5 2021-04-25 [1] CRAN (R 3.6.2)
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
backports 1.3.0 2021-10-27 [1] CRAN (R 3.6.2)
bit 4.0.4 2020-08-04 [1] CRAN (R 3.6.2)
bit64 4.0.5 2020-08-30 [1] CRAN (R 3.6.2)
broom 0.7.10 2021-10-31 [1] CRAN (R 3.6.2)
callr 3.7.0 2021-04-20 [1] CRAN (R 3.6.2)
carrier 0.1.0 2018-10-16 [1] CRAN (R 3.6.0)
cellranger 1.1.0 2016-07-27 [1] CRAN (R 3.6.0)
cli 3.1.0 2021-10-27 [1] CRAN (R 3.6.2)
cluster 2.1.0 2019-06-19 [2] CRAN (R 3.6.2)
codetools 0.2-16 2018-12-24 [2] CRAN (R 3.6.2)
colorspace 2.0-2 2021-06-24 [1] CRAN (R 3.6.2)
crayon 1.4.2 2021-10-29 [1] CRAN (R 3.6.2)
data.table 1.14.2 2021-09-27 [1] CRAN (R 3.6.2)
DBI 1.1.1 2021-01-15 [1] CRAN (R 3.6.2)
dbplyr 2.1.1 2021-04-06 [1] CRAN (R 3.6.2)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.0)
devtools 2.3.0 2020-04-10 [1] CRAN (R 3.6.2)
digest 0.6.28 2021-09-23 [1] CRAN (R 3.6.2)
dplyr
1.0.7 2021-06-18 [1] CRAN (R 3.6.2)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 3.6.2)
fansi 0.5.0 2021-05-25 [1] CRAN (R 3.6.2)
fastmap 1.1.0 2021-01-25 [1] CRAN (R 3.6.2)
forcats 0.5.1 2021-01-27 [1] CRAN (R 3.6.2)
fs 1.5.0 2020-07-31 [1] CRAN (R 3.6.2)
fst 0.9.4 2020-08-27 [1] CRAN (R 3.6.2)
future 1.23.0 2021-10-31 [1] CRAN (R 3.6.2)
generics 0.1.1 2021-10-25 [1] CRAN (R 3.6.2)
ggplot2
3.3.5 2021-06-25 [1] CRAN (R 3.6.2)
globals 0.14.0 2020-11-22 [1] CRAN (R 3.6.2)
glue 1.5.0 2021-11-07 [1] CRAN (R 3.6.2)
gtable 0.3.0 2019-03-25 [1] CRAN (R 3.6.0)
haven 2.4.3 2021-08-04 [1] CRAN (R 3.6.2)
hierfstat 0.5-10 2021-11-17 [1] CRAN (R 3.6.2)
hms 1.1.1 2021-09-26 [1] CRAN (R 3.6.2)
htmltools 0.5.2 2021-08-25 [1] CRAN (R 3.6.2)
httpuv 1.6.3 2021-09-09 [1] CRAN (R 3.6.2)
httr 1.4.2 2020-07-20 [1] CRAN (R 3.6.2)
igraph 1.2.5 2020-03-19 [1] CRAN (R 3.6.0)
jsonlite 1.7.2 2020-12-09 [1] CRAN (R 3.6.2)
later 1.1.0.1 2020-06-05 [1] CRAN (R 3.6.2)
lattice 0.20-38 2018-11-04 [2] CRAN (R 3.6.2)
lifecycle 1.0.1 2021-09-24 [1] CRAN (R 3.6.2)
listenv 0.8.0 2019-12-05 [1] CRAN (R 3.6.0)
lubridate 1.8.0 2021-10-07 [1] CRAN (R 3.6.2)
magrittr 2.0.1 2020-11-17 [1] CRAN (R 3.6.2)
MASS 7.3-54 2021-05-03 [1] CRAN (R 3.6.2)
Matrix 1.2-18 2019-11-27 [2] CRAN (R 3.6.2)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.6.0)
mgcv 1.8-31 2019-11-09 [2] CRAN (R 3.6.2)
mime 0.12 2021-09-28 [1] CRAN (R 3.6.2)
modelr 0.1.8 2020-05-19 [1] CRAN (R 3.6.2)
munsell 0.5.0 2018-06-12 [1] CRAN (R 3.6.0)
nlme 3.1-142 2019-11-07 [2] CRAN (R 3.6.2)
parallelly 1.28.1 2021-09-09 [1] CRAN (R 3.6.2)
pcadapt
4.3.3 2020-05-05 [1] CRAN (R 3.6.2)
permute 0.9-5 2019-03-12 [1] CRAN (R 3.6.0)
pillar 1.6.4 2021-10-18 [1] CRAN (R 3.6.2)
pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 3.6.2)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.0)
pkgload 1.1.0 2020-05-29 [1] CRAN (R 3.6.2)
plyr 1.8.6 2020-03-03 [1] CRAN (R 3.6.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 3.6.0)
processx 3.5.2 2021-04-30 [1] CRAN (R 3.6.2)
promises 1.2.0.1 2021-02-11 [1] CRAN (R 3.6.2)
ps 1.6.0 2021-02-28 [1] CRAN (R 3.6.2)
purrr 0.3.4 2020-04-17 [1] CRAN (R 3.6.2)
R6 2.5.1 2021-08-19 [1] CRAN (R 3.6.2)
radiator
1.2.2 2022-01-31 [1] Github (thierrygosselin/radiator@6efdf14) Rcpp 1.0.7 2021-07-07 [1] CRAN (R 3.6.2)
readr 2.0.2 2021-09-27 [1] CRAN (R 3.6.2)
readxl 1.3.1 2019-03-13 [1] CRAN (R 3.6.0)
remotes 2.2.0 2020-07-21 [1] CRAN (R 3.6.2)
reprex 2.0.1 2021-08-05 [1] CRAN (R 3.6.2)
reshape2 1.4.4 2020-04-09 [1] CRAN (R 3.6.2)
rlang 0.4.12 2021-10-18 [1] CRAN (R 3.6.2)
rprojroot 2.0.2 2020-11-15 [1] CRAN (R 3.6.2)
rstudioapi 0.13 2020-11-12 [1] CRAN (R 3.6.2)
rvest 1.0.2 2021-10-16 [1] CRAN (R 3.6.2)
scales 1.1.1 2020-05-11 [1] CRAN (R 3.6.2)
seqinr 4.2-8 2021-06-09 [1] CRAN (R 3.6.2)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.0)
shiny 1.4.0.2 2020-03-13 [1] CRAN (R 3.6.0)
stringi 1.7.5 2021-10-04 [1] CRAN (R 3.6.2)
stringr
1.4.0 2019-02-10 [1] CRAN (R 3.6.0)
testthat 3.0.2 2021-02-14 [1] CRAN (R 3.6.2)
tibble 3.1.0 2021-02-25 [1] CRAN (R 3.6.2)
tidyr
1.1.4 2021-09-27 [1] CRAN (R 3.6.2)
tidyselect 1.1.1 2021-04-30 [1] CRAN (R 3.6.2)
tidyverse * 1.3.1 2021-04-15 [1] CRAN (R 3.6.2)
tzdb 0.2.0 2021-10-27 [1] CRAN (R 3.6.2)
usethis 1.6.1 2020-04-29 [1] CRAN (R 3.6.2)
utf8 1.2.2 2021-07-24 [1] CRAN (R 3.6.2)
vctrs 0.3.8 2021-04-29 [1] CRAN (R 3.6.2)
vegan 2.5-7 2020-11-28 [1] CRAN (R 3.6.2)
vroom 1.5.5 2021-09-14 [1] CRAN (R 3.6.2)
withr 2.4.2 2021-04-18 [1] CRAN (R 3.6.2)
xml2 1.3.2 2020-04-23 [1] CRAN (R 3.6.2)
xtable 1.8-4 2019-04-21 [1] CRAN (R 3.6.0)

[1] /Users/gary.longo/Library/R/3.6/library [2] /Library/Frameworks/R.framework/Versions/3.6/Resources/library

Happy to email the genind to you, just let me know.

Cheers, Gary

evhersh commented 2 years ago

Hello,

I am attempting to use genomic_converter to convert my genlight object to other formats (bayescan and tidyr). I keep getting a similar error message as those above. I have updated to the latest version on Github.


lynx.bayescan <- genomic_converter(lynx.gl, output="bayescan") ################################################################################ ######################### radiator::genomic_converter ########################## ################################################################################ Execution date@time: 20220503@1602 Folder created: -272_radiator_genomic_converter_20220503@1602 Function call and arguments stored in: radiator_genomic_converter_args_20220503@1602.tsv Filters parameters file generated: filters_parameters_20220503@1602.tsv

Importing data: genlight Calibrating REF/ALT alleles... Error in stop_subscript(): ! Can't rename columns that don't exist. ✖ Column ALT doesn't exist. Run rlang::last_error() to see where the error occurred.

Computation time, overall: 22 sec ######################### completed genomic_converter ##########################

rlang::last_error() <error/vctrs_error_subscript_oob> Error in stop_subscript(): ! Can't rename columns that don't exist. ✖ Column ALT doesn't exist.

Backtrace:

  1. radiator::genomic_converter(lynx.gl, output = "bayescan")
  2. dplyr:::rename.data.frame(., REF = ALT, ALT = REF)
  3. tidyselect::eval_rename(expr(c(...)), .data)
  4. tidyselect:::rename_impl(...)
  5. tidyselect:::eval_select_impl(...)
  6. tidyselect:::vars_select_eval(...)
  7. tidyselect:::walk_data_tree(expr, data_mask, context_mask, error_call)
  8. tidyselect:::eval_c(expr, data_mask, context_mask)
  9. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
  10. tidyselect:::walk_data_tree(new, data_mask, context_mask)
  11. tidyselect:::as_indices_sel_impl(...)
  12. tidyselect:::as_indices_impl(x, vars, call = call, strict = strict)
  13. tidyselect:::chr_as_locations(x, vars, call = call)
  14. vctrs::vec_as_location(x, n = length(vars), names = vars)
  15. vctrs <fn>()
  16. vctrs:::stop_subscript_oob(...)
  17. vctrs:::stop_subscript(...) Run rlang::last_trace() to see the full context.

I get the same error when trying to convert to tidyr. In case it's relevant it's reference aligned RADseq data from Stacks 2, which I imported into R using vcfR and converted to genlight using vcfR2genlight(). Let me know if I'm doing something wrong or if there's some way to fix!

Thanks!!!

Evan

thierrygosselin commented 1 year ago

@evhersh Hi Evan, sorry for the late reply, you probably found a way around to generate your bayesian file. Do you mind sharing the genlight and the stacks VCF file ? over email...

Best Thierry

thierrygosselin commented 1 year ago

@gclongo Hi Gary, Sharing the genind object would help a lot to help with your issue if it still relevant Sorry for the delay Thierry

thierrygosselin commented 1 year ago

re-open the issue if the problem persist and please follow guidelines so that I can actually help

vmglynn commented 1 year ago

Hello Thierry,

I hope this finds you well.

I just downloaded 'radiator' from GitHub, and the issue described above persists on my end. Any guidance or help would be deeply appreciated.

I have a VCF file that I converted to a genlight object for other analyses, which has a set ploidy of 2 and is confirmed to have no duplicated loci. In now trying to convert my genlight object into the STRUCTURE format, the "Column ALT doesn't exist" error emerges:

genomic_converter(
  data = gl.rubi,
  strata = "C:\\Users\\vmgly\\Documents\\holobiont_2020-2021\\PCA_19Sep2022\\strata_vcf_20Jan2023_tsv.tsv",
  filter.monomorphic = TRUE,
  filter_common_markers = TRUE, 
  output = "structure",
  parallel.core = 1L)

The output, with the error, is as follows:

Execution date@time: 20230220@2055

Unknowned arguments identified inside "...": 
    filter_common_markers

Read documentation, for latest changes, and modify your codes!

Folder created: -1053_radiator_genomic_converter_20230220@2055
Function call and arguments stored in: radiator_genomic_converter_args_20230220@2055.tsv
Filters parameters file generated: filters_parameters_20230220@2055.tsv
Calibrating REF/ALT alleles...
Error in `dplyr::rename()`:
! Can't rename columns that don't exist.
✖ Column `ALT` doesn't exist.
Backtrace:
  1. radiator::genomic_converter(...)
 12. dplyr:::rename.data.frame(., REF = ALT, ALT = REF)

Computation time, overall: 114 sec
######################### completed genomic_converter ##########################
✖ Importing data: genlight [1m 54s]

rlang::last_trace() presents the following:

<error/vctrs_error_subscript_oob>
Error in `dplyr::rename()`:
! Can't rename columns that don't exist.
✖ Column `ALT` doesn't exist.
---
Backtrace:
     ▆
  1. ├─radiator::genomic_converter(...)
  2. │ └─radiator::tidy_genomic_data(...)
  3. │   └─radiator::tidy_genlight(data = data, gds = FALSE)
  4. │     └─... %$% input
  5. ├─base::with(., input)
  6. ├─radiator::calibrate_alleles(data = ., biallelic = TRUE, verbose = verbose)
  7. │ ├─dplyr::bind_rows(...)
  8. │ │ └─rlang::list2(...)
  9. │ └─... %>% ...
 10. ├─dplyr::relocate(., tidyselect::one_of(col.order))
 11. ├─dplyr::rename(., REF = ALT, ALT = REF)
 12. ├─dplyr:::rename.data.frame(., REF = ALT, ALT = REF)
 13. │ └─tidyselect::eval_rename(expr(c(...)), .data)
 14. │   └─tidyselect:::rename_impl(...)
 15. │     └─tidyselect:::eval_select_impl(...)
 16. │       ├─tidyselect:::with_subscript_errors(...)
 17. │       │ └─rlang::try_fetch(...)
 18. │       │   └─base::withCallingHandlers(...)
 19. │       └─tidyselect:::vars_select_eval(...)
 20. │         └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
 21. │           └─tidyselect:::eval_c(expr, data_mask, context_mask)
 22. │             └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
 23. │               └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
 24. │                 └─tidyselect:::as_indices_sel_impl(...)
 25. │                   └─tidyselect:::as_indices_impl(...)
 26. │                     └─tidyselect:::chr_as_locations(x, vars, call = call, arg = arg)
 27. │                       └─vctrs::vec_as_location(...)
 28. └─vctrs (local) `<fn>`()
 29.   └─vctrs:::stop_subscript_oob(...)
 30.     └─vctrs:::stop_subscript(...)
 31.       └─rlang::abort(...)

For your reference, this is the output of devtools::session_info():

─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.1 (2022-06-23 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-02-20
 rstudio  2022.12.0+353 Elsbeth Geranium (desktop)
 pandoc   2.19.2 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package          * version  date (UTC) lib source
   ade4             * 1.7-19   2022-04-19 [1] CRAN (R 4.2.1)
   adegenet         * 2.1.8    2022-10-02 [1] CRAN (R 4.2.1)
   ape                5.6-2    2022-03-02 [1] CRAN (R 4.2.1)
   assertthat         0.2.1    2019-03-21 [1] CRAN (R 4.2.1)
   backports          1.4.1    2021-12-13 [1] CRAN (R 4.2.0)
   Biobase            2.56.0   2022-04-26 [1] Bioconductor
   BiocGenerics       0.42.0   2022-04-26 [1] Bioconductor
   biomformat         1.24.0   2022-04-26 [1] Bioconductor
   Biostrings         2.64.1   2022-08-25 [1] Bioconductor
   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)
   bitops             1.0-7    2021-04-24 [1] CRAN (R 4.2.0)
   boot               1.3-28   2021-05-03 [2] CRAN (R 4.2.1)
   broom              1.0.1    2022-08-29 [1] CRAN (R 4.2.1)
   cachem             1.0.6    2021-08-19 [1] CRAN (R 4.2.1)
   callr              3.7.2    2022-08-22 [1] CRAN (R 4.2.1)
   cellranger         1.1.0    2016-07-27 [1] CRAN (R 4.2.1)
   cli                3.4.1    2022-09-23 [1] CRAN (R 4.2.1)
   cluster            2.1.4    2022-08-22 [1] CRAN (R 4.2.1)
   codetools          0.2-18   2020-11-04 [2] CRAN (R 4.2.1)
   colorspace         2.0-3    2022-02-21 [1] CRAN (R 4.2.1)
   conStruct        * 1.0.4    2019-12-12 [1] CRAN (R 4.2.2)
   crayon             1.5.2    2022-09-29 [1] CRAN (R 4.2.1)
   data.table         1.14.4   2022-10-17 [1] CRAN (R 4.2.1)
   DBI                1.1.3    2022-06-18 [1] CRAN (R 4.2.1)
   dbplyr             2.2.1    2022-06-27 [1] CRAN (R 4.2.1)
   devtools         * 2.4.5    2022-10-11 [1] CRAN (R 4.2.1)
   digest             0.6.30   2022-10-18 [1] CRAN (R 4.2.1)
   dplyr            * 1.0.10   2022-09-01 [1] CRAN (R 4.2.1)
   ellipsis           0.3.2    2021-04-29 [1] CRAN (R 4.2.1)
   evaluate           0.17     2022-10-07 [1] CRAN (R 4.2.1)
   fansi              1.0.3    2022-03-24 [1] CRAN (R 4.2.1)
   farver             2.1.1    2022-07-06 [1] CRAN (R 4.2.1)
   fastmap            1.1.0    2021-01-25 [1] CRAN (R 4.2.1)
   forcats          * 0.5.2    2022-08-19 [1] CRAN (R 4.2.1)
   foreach            1.5.2    2022-02-02 [1] CRAN (R 4.2.1)
   fs                 1.5.2    2021-12-08 [1] CRAN (R 4.2.1)
   gargle             1.2.1    2022-09-08 [1] CRAN (R 4.2.1)
   gdsfmt           * 1.32.0   2022-04-26 [1] Bioconductor
   generics           0.1.3    2022-07-05 [1] CRAN (R 4.2.1)
   GenomeInfoDb       1.32.4   2022-09-06 [1] Bioconductor
   GenomeInfoDbData   1.2.8    2022-10-26 [1] Bioconductor
   GenomicRanges      1.48.0   2022-04-26 [1] Bioconductor
   ggplot2          * 3.4.0    2022-11-04 [1] CRAN (R 4.2.2)
   glue               1.6.2    2022-02-24 [1] CRAN (R 4.2.1)
   googledrive        2.0.0    2021-07-08 [1] CRAN (R 4.2.1)
   googlesheets4      1.0.1    2022-08-13 [1] CRAN (R 4.2.1)
   gridExtra          2.3      2017-09-09 [1] CRAN (R 4.2.1)
   gtable             0.3.1    2022-09-01 [1] CRAN (R 4.2.1)
   haven              2.5.1    2022-08-22 [1] CRAN (R 4.2.1)
   hms                1.1.2    2022-08-19 [1] CRAN (R 4.2.1)
   htmltools          0.5.3    2022-07-18 [1] CRAN (R 4.2.1)
   htmlwidgets        1.5.4    2021-09-08 [1] CRAN (R 4.2.1)
   httpuv             1.6.6    2022-09-08 [1] CRAN (R 4.2.1)
   httr               1.4.4    2022-08-17 [1] CRAN (R 4.2.1)
   igraph             1.3.5    2022-09-22 [1] CRAN (R 4.2.1)
   inline             0.3.19   2021-05-31 [1] CRAN (R 4.2.1)
   IRanges            2.30.1   2022-08-25 [1] Bioconductor
   iterators          1.0.14   2022-02-05 [1] CRAN (R 4.2.1)
   jsonlite           1.8.3    2022-10-21 [1] CRAN (R 4.2.1)
   knitr              1.40     2022-08-24 [1] CRAN (R 4.2.1)
   labeling           0.4.2    2020-10-20 [1] CRAN (R 4.2.0)
   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.1)
   lifecycle          1.0.3    2022-10-07 [1] CRAN (R 4.2.1)
   loo                2.5.1    2022-03-24 [1] CRAN (R 4.2.1)
   lubridate          1.8.0    2021-10-07 [1] CRAN (R 4.2.1)
   magrittr         * 2.0.3    2022-03-30 [1] CRAN (R 4.2.1)
   MASS               7.3-57   2022-04-22 [2] CRAN (R 4.2.1)
   Matrix             1.5-1    2022-09-13 [1] CRAN (R 4.2.1)
   matrixStats        0.62.0   2022-04-19 [1] CRAN (R 4.2.1)
   memoise            2.0.1    2021-11-26 [1] CRAN (R 4.2.1)
   memuse             4.2-1    2021-10-20 [1] CRAN (R 4.2.0)
   mgcv               1.8-41   2022-10-21 [1] CRAN (R 4.2.1)
   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.1)
   modelr             0.1.9    2022-08-19 [1] CRAN (R 4.2.1)
   multtest           2.52.0   2022-04-26 [1] Bioconductor
   munsell            0.5.0    2018-06-12 [1] CRAN (R 4.2.1)
   nlme               3.1-160  2022-10-10 [1] CRAN (R 4.2.1)
   pegas              1.1      2021-12-16 [1] CRAN (R 4.2.1)
   permute            0.9-7    2022-01-27 [1] CRAN (R 4.2.1)
   phyloseq           1.40.0   2022-04-26 [1] Bioconductor
   pillar             1.8.1    2022-08-19 [1] CRAN (R 4.2.1)
   pinfsc50           1.2.0    2020-06-03 [1] CRAN (R 4.2.0)
   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.7    2022-03-24 [1] CRAN (R 4.2.1)
   polysat            1.7-7    2022-08-23 [1] CRAN (R 4.2.1)
   poppr            * 2.9.3    2021-09-07 [1] CRAN (R 4.2.1)
   prettyunits        1.1.1    2020-01-24 [1] CRAN (R 4.2.1)
   processx           3.8.0    2022-10-26 [1] CRAN (R 4.2.1)
   profvis            0.3.7    2020-11-02 [1] CRAN (R 4.2.1)
   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            * 0.3.5    2022-10-06 [1] CRAN (R 4.2.1)
   R6                 2.5.1    2021-08-19 [1] CRAN (R 4.2.1)
   radiator         * 1.2.5    2023-02-20 [1] Github (thierrygosselin/radiator@430ef84)
   ragg               1.2.4    2022-10-24 [1] CRAN (R 4.2.1)
   RColorBrewer     * 1.1-3    2022-04-03 [1] CRAN (R 4.2.0)
   Rcpp             * 1.0.9    2022-07-08 [1] CRAN (R 4.2.1)
 D RcppParallel       5.1.5    2022-01-05 [1] CRAN (R 4.2.1)
   RcppZiggurat       0.1.6    2020-10-20 [1] CRAN (R 4.2.2)
   RCurl              1.98-1.9 2022-10-03 [1] CRAN (R 4.2.1)
   readr            * 2.1.3    2022-10-01 [1] CRAN (R 4.2.1)
   readxl             1.4.1    2022-08-17 [1] CRAN (R 4.2.1)
   remotes            2.4.2    2021-11-30 [1] CRAN (R 4.2.2)
   reprex             2.0.2    2022-08-17 [1] CRAN (R 4.2.1)
   reshape2           1.4.4    2020-04-09 [1] CRAN (R 4.2.1)
   Rfast              2.0.6    2022-02-16 [1] CRAN (R 4.2.2)
   rhdf5              2.40.0   2022-04-26 [1] Bioconductor
 D rhdf5filters       1.8.0    2022-04-26 [1] Bioconductor
   Rhdf5lib           1.18.2   2022-05-15 [1] Bioconductor
   rlang              1.0.6    2022-09-24 [1] CRAN (R 4.2.1)
   rmarkdown          2.17     2022-10-07 [1] CRAN (R 4.2.1)
   RSpectra           0.16-1   2022-04-24 [1] CRAN (R 4.2.2)
   rstan              2.21.7   2022-09-08 [1] CRAN (R 4.2.1)
   rstantools         2.2.0    2022-04-08 [1] CRAN (R 4.2.2)
   rstudioapi         0.14     2022-08-22 [1] CRAN (R 4.2.1)
   rvest              1.0.3    2022-08-19 [1] CRAN (R 4.2.1)
   S4Vectors          0.34.0   2022-04-26 [1] Bioconductor
   scales             1.2.1    2022-08-20 [1] CRAN (R 4.2.1)
   SeqArray         * 1.38.0   2022-11-01 [1] Bioconductor
   seqinr             4.2-16   2022-05-19 [1] CRAN (R 4.2.1)
   sessioninfo        1.2.2    2021-12-06 [1] CRAN (R 4.2.1)
   shiny              1.7.3    2022-10-25 [1] CRAN (R 4.2.1)
   smartsnp         * 1.1.0    2023-02-16 [1] Github (ChristianHuber/smartsnp@5aaca0c)
   StanHeaders        2.21.0-7 2020-12-17 [1] CRAN (R 4.2.1)
   stringi            1.7.8    2022-07-11 [1] CRAN (R 4.2.1)
   stringr          * 1.4.1    2022-08-20 [1] CRAN (R 4.2.1)
   survival           3.3-1    2022-03-03 [2] CRAN (R 4.2.1)
   systemfonts        1.0.4    2022-02-11 [1] CRAN (R 4.2.1)
   textshaping        0.3.6    2021-10-13 [1] CRAN (R 4.2.1)
   tibble           * 3.1.8    2022-07-22 [1] CRAN (R 4.2.1)
   tidyr            * 1.2.1    2022-09-08 [1] CRAN (R 4.2.1)
   tidyselect         1.2.0    2022-10-10 [1] CRAN (R 4.2.1)
   tidyverse        * 1.3.2    2022-07-18 [1] CRAN (R 4.2.1)
   tzdb               0.3.0    2022-03-28 [1] CRAN (R 4.2.1)
   UpSetR             1.4.0    2019-05-22 [1] CRAN (R 4.2.2)
   urlchecker         1.0.1    2021-11-30 [1] CRAN (R 4.2.1)
   usethis          * 2.1.6    2022-05-25 [1] CRAN (R 4.2.1)
   utf8               1.2.2    2021-07-24 [1] CRAN (R 4.2.1)
   vcfR             * 1.13.0   2022-07-16 [1] CRAN (R 4.2.1)
   vctrs              0.5.0    2022-10-22 [1] CRAN (R 4.2.1)
   vegan              2.6-4    2022-10-11 [1] CRAN (R 4.2.1)
   viridisLite        0.4.1    2022-08-22 [1] CRAN (R 4.2.1)
   vroom              1.6.0    2022-09-30 [1] CRAN (R 4.2.1)
   withr              2.5.0    2022-03-03 [1] CRAN (R 4.2.1)
   xfun               0.34     2022-10-18 [1] CRAN (R 4.2.1)
   xml2               1.3.3    2021-11-30 [1] CRAN (R 4.2.1)
   xtable             1.8-4    2019-04-21 [1] CRAN (R 4.2.1)
   XVector            0.36.0   2022-04-26 [1] Bioconductor
   yaml               2.3.6    2022-10-18 [1] CRAN (R 4.2.1)
   zlibbioc           1.42.0   2022-04-26 [1] Bioconductor

 [1] C:/Users/vmgly/AppData/Local/R/win-library/4.2
 [2] C:/Program Files/R/R-4.2.1/library

 D ── DLL MD5 mismatch, broken installation.

Thank you again for creating 'radiator.' If I can provide any further information, please let me know.

Thank you in advance.

Best regards,

Victoria