Hi,
I'm wondering if somebody used the "gbs2ploidy" package in connection with dartR? It is a package designed to infer ploidy from the GBS data. Unfortunately, the specifications for the input file are a bit unclear there. Though the input does not seem extraordinary and basically you need a "P (number of SNPs) by N (number of individuals) matrix with read counts for the first allele (e.g., the non-reference allele)" and the same for the second allele. Then also a "numeric vector with the observed heterozygosity for each individual and a "numeric vector with the mean number of reads per SNP for each individual".
There is at least one case where DARTseq data were used in this package but unfortunately not through the dartR (
https://www.mdpi.com/2073-4395/11/10/1897 ).
This should be relatively simple but I'm missing something. The easiest solution that I came up with was:
library(gbs2ploidy)
estprops(cov1 = t(genlight.object$other$loc.metrics$FreqHomSnp), cov2 = t(genlight.object$other$loc.metrics$FreqHomRef), props = c(0.25, 0.33, 0.5, 0.66, 0.75), mcmc.nchain = 2, mcmc.steps = 10000, mcmc.burnin = 1000, mcmc.thin = 2)
or
estprops(cov1 = t(genlight.object$other$loc.metrics$OneRatioSnp), cov2 = t(genlight.object$other$loc.metrics$OneRatioRef), props = c(0.25, 0.33, 0.5, 0.66, 0.75), mcmc.nchain = 2, mcmc.steps = 10000, mcmc.burnin = 1000, mcmc.thin = 2)
but it doesn't work.
Link to the CRAN page:
https://cran.r-project.org/web/packages/gbs2ploidy/index.html and to the article:
https://onlinelibrary.wiley.com/doi/10.1111/1755-0998.12657Best regards,
Kamil