R语言pophelper包对 Admixture遗传结构分析可视化
代码如下
rm(list=ls());gc();
BiocManager::install('pophelper')
#安装依赖包
install.packages(c("devtools","ggplot2","gridExtra","gtable","label.switching","tidyr"),dependencies=T)
# install pophelper package from GitHub
devtools::install_github('royfrancis/pophelper')
library(pophelper)
library(data.table)
options(stringsAsFactors = F)
alist <- readQ(filetype="auto",list.files(path="D:/test/", full.names=T))
alist<-alignK(alist)
plotQ(alist,exportpath=getwd(),sortind="all" , height = 5,
width = 5,showyaxis = TRUE,imgtype="pdf",showlegend = TRUE,showdiv = FALSE,outputfilename="plotq7")
plotQMultiline(alist,sortind="all",exportpath=getwd())
往期推荐