# R script to visualize the isoform-eQTL effects for each significant sQTL # beta represents a vector of the isoform-eQTL effect for each isoform # se represents a vector of the standard error (SE) of the isoform-eQTL effect # isoform represents a vector of the isoform name of the gene library(ggplot2) ci_low=beta-1.96*se; ci_upp=beta+1.96*se; data=data.frame(isoform,beta,se,ci_low,ci_upp) p <- ggplot(data, aes(x=isoform, y=beta, ymin=ci_low, ymax=ci_upp,col=isoform,fill=isoform)) + geom_linerange(size=5,position=position_dodge(width = 0.5)) + geom_hline(yintercept=0, lty=2,alpha=0.5) + geom_point(size=3, shape=21, colour="white", stroke = 0.5,position=position_dodge(width = 0.5)) + coord_flip() + theme_minimal() + theme(legend.position="none") + ggtitle("") + ylab(paste0("isoform-eQTL effect")) + xlab("") + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank()) + theme(panel.border=element_blank(),axis.line.x=element_line(color="black",size=0.8),axis.line.y=element_line(color="black",size=0.8)) + theme(legend.position="none") + theme(axis.text.x = element_text(vjust=1, hjust=0.5, colour="black",size=12),axis.ticks.x=element_blank()) + theme(axis.text.y = element_text(vjust=0.5, hjust=1, colour="black",size=12)) + theme(axis.title.y=element_text(size=16)) + theme(plot.margin=unit(c(1.5,1.2,0.1,1.2),"cm"))
Baidu
map