画染色体上的基因分布图;
代码:
install.packages("gggenes")
library(ggplot2)
library(gggenes)
mydata<-read.csv("YSDR-annotation.txt", sep="\t")
mydata
p1<-ggplot(mydata, aes(xmin=start,xmax=end,y=chr,fill=gene))+
geom_gene_arrow() +
scale_x_continuous(limits = c(0, 200000),breaks=seq(0,200000,25000))+
facet_wrap(~ chr, scales = "free", ncol = 1, nrow=1) +
scale_fill_brewer(palette = "Set3")+
theme(legend.position = "bottom" )+
#geom_point(df, mapping=aes(x=BP,y=10),color="orchid")+
theme_genes()
p1
图:













网友评论