Hi,

I am trying to use Adegent to determine the optimal number of k in my data. However I am getting a BIC graph that is constantly increasing and a PCA graph that is saying each PCA is explaining very little variance. I have attached the graphs.

Also, I am wondering if it has something to do with my structure file. My structure file codes for 1-4, with missing data as -9. In my Genind file it has NA, 0,1,and 2 (subset attached).

I am using ddRAd data that has been assembled using stacks. I have only used 1 random SNP from each locus. I then filteredthe data using PLINK. praticularly --min_maf 0.01 and --geno 0.2.

I have tried using the unfiltered data and I get the same result. I have tried filtering the data to exclude any SNP that has a single mssing data point and it is the same. Currently I am running structure, and the file runs in that.

install.packages("adegenet", dep=TRUE)

install.packages("ade4", dep = TRUE)

install.packages("hierfstat", dep = TRUE)

install.packages("genetics", dep = TRUE)

setwd("\\Users\\morri\\Desktop\\Buccinum_Data\\Methods\\Adegenet")

library(adegenet)

library(ade4)

library(hierfstat)

library(genetic)

whelk

Similar questions and discussions