Can I please get your help converting a dartR file to genepop file?
I converted my data file to genlight:
gen <- new("genlight", glhw.filt)
gpop <- gl2genepop(gen, outfile ="glhw.filt.gen")
but then I receive the following error when using gl2genepop:
stop("Fatal Error: Detected Presence/Absence (SilicoDArT) data. Please provide a SNP dataset\n")
Any advice?
Many thanks,
Vanessa
Hi Vanessa,
Based on the information you provided, it appears that you're using the gl2genepop function code that was posted in this forum four years ago. This function is now implemented in dartR. To resolve the issue, please follow these steps:
Ensure you have the latest version of dartR.base installed on your computer. You can install it using the following code:
install.packages("dartR.base")If you encounter any issues during installation, please refer to our tutorial "Tutorial_2_dartR_Installation_2-Aug-24.pdf," available for download at: http://georges.biomatix.org/dartR.
Remove the function you sourced ("gl2genepop.R") by either:
Read your data using one of dartR's reading functions:
For more details, see:
Convert your genlight object using the following approach:
library(dartRverse)
t1 <- gl.read.dart("your_DArT_report")
gl2genepop(t1, outpath = getwd())Let me know if this resolves the issue or if you need further assistance.
Best,
Luis