Is it possible to get the data to "gbs2ploidy" straight from "dartR"?

15 views
Skip to first unread message

k K

unread,
Mar 15, 2023, 7:55:54 AM3/15/23
to dartR
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.12657

Best regards,
Kamil

Jose Luis Mijangos

unread,
Mar 15, 2023, 8:55:40 PM3/15/23
to dartR
Hi Kamil,

Read counts per SNP per individual are not included in DArT's reports. I guess it wouldn't hurt to ask them if they can provide this information. 

Cheers,
Luis 

Reply all
Reply to author
Forward
0 new messages