|
###7.3. FST OUTLIER DETECTION |
|
#A. Compute results for the best run |
|
res = Gettess3res(tess3.ls, K=optimal_K) |
|
|
|
#B. Select FST statistics for the best run |
|
FST = res$Fst |
|
|
|
#C. Compute the GIF - genomic inflation factor |
|
lambda = res$gif |
|
lambda # 3.750238 |
|
|
|
#D. Compute adjusted p-values from the combined z-scores and plot histogram of p-values |
|
n = dim(Q(project, run, optimal_K))[1] |
|
z.scores = sqrt(FST*(n-optimal_K)/(1-FST)) |
|
adj.p.values = pchisq(z.scores^2/lambda, df = optimal_K-1, lower = FALSE) |
|
hist(adj.p.values, col = "red") |
Hello Jeronymo,
I am at this chunk of code, using tess3 method to do spatial genetic structuring.
at the line 905, which "project" object do you mean? Maybe you mean the best run object called "res" at line 895?
Thanks,
LanGen_pipeline_version2/1.1_FILTERING_SNPs.R
Lines 893 to 908 in d98a65e
Hello Jeronymo,
I am at this chunk of code, using tess3 method to do spatial genetic structuring.
at the line 905, which "project" object do you mean? Maybe you mean the best run object called "res" at line 895?
Thanks,