thierrygosselin / radiator

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

Genomic_converter error #141

Closed lneaves closed 3 years ago

lneaves commented 3 years ago

Thank you for the great package. I think there must be something obvious that I am missing in the setup (so apologise if that is the case but I can seem to find it) because I have seen some similar errors reported here that were fixed in the most recent version, but I still seem to be encountering the problem.

I'm trying to convert a genlight object to a plink file. It failed with my data file (a genlight object created from Dart data) producing the error - Error: Can't subset columns that don't exist. x Column GT doesn't exist. In troubleshooting the problem I found I couldn't get it to work with the test example provided in the dartR package - bandicoot.gl either. So I have been using that to test with.

The command and error produced are below:

genomic_converter(bandicoot.gl, output="plink", filename="test") ################################################################################ ######################### radiator::genomic_converter ########################## ################################################################################ Execution date@time: 20210926@2025 Folder created: -10028_radiator_genomic_converter_20210926@2025
Function call and arguments stored in: radiator_genomic_converter_args_20210926@2025.tsv Filters parameters file generated: filters_parameters_20210926@2025.tsv

Importing data: genlight Calibrating REF/ALT alleles...

Writing tidy data set: test.rad

Preparing data for output

Data is bi-allelic Generating PLINK tped/tfam files Error: Can't subset columns that don't exist. x Column GT doesn't exist. Run rlang::last_error() to see where the error occurred.

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

output of `devtools::session_info()

devtools::session_info()

  • Session info ---------------------------------------------------------------------- setting value
    version R version 4.1.1 (2021-08-10) os Windows 10
    system i386, mingw32
    ui Rgui
    language (EN)
    collate English_Australia.1252
    ctype English_Australia.1252
    tz Australia/Sydney
    date 2021-09-26

[1] C:/Users/Lneav/Documents/R/win-library/4.1 [2] C:/Program Files/R/R-4.1.1/library

Datafile: bandicoot.gl - example file found in dartR package

library(dartR) bandicoot.gl /// GENLIGHT OBJECT /////////

// 96 genotypes, 1,000 binary SNPs, size: 7.1 Mb 1705 (1.78 %) missing data

// Basic content @gen: list of 96 SNPbin @ploidy: ploidy of each individual (range: 2-2)

// Optional content @ind.names: 96 individual labels @loc.names: 1000 locus labels @loc.all: 1000 alleles @position: integer storing positions of the SNPs @pop: population of each individual (group size range: 12-29) @other: a list containing: loc.metrics latlong ind.metrics loc.metrics.flags verbose history

Many thanks for the help. Linda

thierrygosselin commented 3 years ago

Try the latest release, it should work