[adegenet-forum] DAPC - 3.4 Interpreting variable contributions (using a genlight object)

Alan Garcia-Elfring alangarcia87 at hotmail.com
Mon Feb 27 20:19:00 CET 2017


Hi all,


I have a genlight object and I would like to analyze the contributions of different alleles to populations structure.


The example on the manual is for genind objects and a previous answer indicated that the fix-around, using as.data.frame, is only good for haploid data. http://lists.r-forge.r-project.org/pipermail/adegenet-forum/2014-May/000840.html

Is it yet possible to do section 3.4 (Jombart and Collins 2015) with a diploid dataset? It would be really cool if so!

Thanks,

Alan

> pldata
 /// GENLIGHT OBJECT /////////

 // 223 genotypes,  76,288 binary SNPs, size: 9 Mb
 0 (0 %) missing data

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

 // Optional content
   @ind.names:  223 individual labels
   @loc.names:  76288 locus labels
   @pop: population of each individual (group size range: 1-1)
   @other: a list containing: sex  phenotype  pat  mat

> freq399 <- tab(genind2genpop(pldata[loc=c("41837")]),freq=TRUE)
Error in genind2genpop(pldata[loc = c("41837")]) :
  x is not a valid genind object
[cid:732fdd8f-ab46-46ff-97d3-0dd3b4bc8971]




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170227/2022e53d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot.png
Type: image/png
Size: 41041 bytes
Desc: Rplot.png
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170227/2022e53d/attachment-0001.png>


More information about the adegenet-forum mailing list