library(CMplot)
library(tidyverse)
fst = choose.files()
pi = choose.files()
fst1 = read.table(fst, header = T)
head(fst1)
fst2 = fst1 %>% select(1,2,3,6) %>% top_frac(0.05,wt = MEAN_FST)
head(fst2)
write.table(fst2,"fst_vasuclar.txt",quote = F,row.names = F,sep = "\t")
pi1 = read.table(pi, header = T)
head(pi1)
pi2 = pi1 %>% select(1,2,3,5) %>% top_frac(0.05,wt = PI)
head(pi2)
write.table(pi2,"pi2_vasuclar.txt",quote = F,row.names = F,sep = "\t")
标签:GWAS,进化,代码,head,fst1,fst2,pi1,table,pi2
From: https://www.cnblogs.com/xiaosagege/p/17865486.html