adegenet icon indicating copy to clipboard operation
adegenet copied to clipboard

find.cluster not clustering groups

Open katcatalano opened this issue 8 years ago • 0 comments

Hello,

I'm new to adegenet, but I'm following the DAPC tutorial after finding mysterious clustering in a dudi.pca() of my genind format SNP data (747 loci, 2061 individuals). My data appears to have three distinct clusters, and when I run find.clusters, I see k of 3-8 is most appropriate. However, grp$grp yields 1 group with all of my 2061 individuals. I have no informative pop data for this data set, so I've set dat@pop=NULL. The information in grp seems to be wrong, and when I run dapc() I get the error:

Error in svd(X, nu = 0L): infinite or missing values in 'x' Traceback:

  1. dapc(dat_genx, group$grp)
  2. dapc.matrix(dat_genx, group$grp)
  3. dapc(as.data.frame(x), ...)
  4. dapc.data.frame(as.data.frame(x), ...)
  5. lda(XU, grp, tol = 1e-30)
  6. lda.data.frame(XU, grp, tol = 1e-30)
  7. lda(structure(data.matrix(x), class = "matrix"), ...)
  8. lda.matrix(structure(data.matrix(x), class = "matrix"), ...)
  9. lda.default(x, grouping, ...)
  10. svd(X, nu = 0L)
  11. stop("infinite or missing values in 'x'")

There is no missing data in my genind object, so it's unclear to me where this is coming from. I have also tried to set arbitrary dat@pop values based on the site where I collected the samples, but even with a populated dat@pop field the find.clusters()/dapc() outputs still have the same issues. Any help would be appreciated, I've combed the adegenet documentation and forum thoroughly.

Thank you very much! Katrina

screen shot 2018-04-12 at 1 03 05 pm

pca

k

katcatalano avatar Apr 12 '18 17:04 katcatalano