今天做的是一副《nature microbiology》的氣泡圖,圖比較簡(jiǎn)單,但是展示的內(nèi)容可以是各種,我暫時(shí)想的是---(1)可以用這個(gè)氣泡圖展示兩組變量的相關(guān)系數(shù),相關(guān)性,氣泡大小表示相關(guān)大小。(2)基因或者蛋白之間的互作,點(diǎn)的大小代表互作的強(qiáng)弱。(3)受配體關(guān)系的展示。可能還是有更多的用處,發(fā)揮自己的想象,總有用武之地。
文章圖片如下:

image.png
(Reference:Core gut microbial communities are maintained by beneficial interactions and strain variability in fish)
就直接作圖吧,比較簡(jiǎn)單,之前我們做過(guò)很多氣泡圖,這個(gè)也不是難事!
setwd("E:/生物信息學(xué)/互作點(diǎn)圖")
A <- read.csv("相互點(diǎn)圖.csv", header = T,row.names = 1)
library(forcats)
A$B <- as.factor(A$B)
A$B <- fct_inorder(A$B)
library(ggplot2)
ggplot(A,aes(x=B,y= A,color=A)) +
geom_point(aes(size=Value)) +
scale_size(rang = c(0,10)) +
scale_x_discrete(position = "bottom" ,expand=c(0.2,0))+
labs(x=NULL,y=NULL)+
theme_bw()+
theme(axis.text.x=element_text(angle=90,hjust = 1,vjust=0.5),
panel.border = element_blank(),
axis.text =element_text(size = 12, color = "black"),
axis.ticks = element_blank())+
scale_colour_manual(name ="other", values =c('#efb306',
'#eb990c',
'#e8351e',
'#cd023d',
'#852f88',
'#4e54ac',
'#0f8096'))+
guides(color=F)

image.png
復(fù)現(xiàn)就結(jié)束了,還是可以!示例數(shù)據(jù)及注釋代碼會(huì)上傳群文件,更多內(nèi)容請(qǐng)至公眾號(hào)《KS科研分享與服務(wù)》!