论文
MiDAS 4: A global catalogue of full-length 16S rRNA gene sequences and taxonomy for studies of bacterial communities in wastewater treatment plants
https://www.nature.com/articles/s41467-022-29438-7
数据链接
https://figshare.com/articles/dataset/Dueholm2021a_data_zip/16566408/1
代码链接
https://github.com/msdueholm/MiDAS4
本日的推文我们重复一下论文中的Figure1a 天下舆图
之前的推文先容过天下舆图添加采样所在
起首是舆图
我这里就不画国家的边界了,原来是想添加每个洲的边界的,但是临时没有找到办法,想到了再来先容吧
library(ggplot2)world<-map_data("world")ggplot() + geom_polygon(data=world,aes(x=long,y=lat,group=group), fill="#dedede")+ theme_bw()+ scale_y_continuous(expand = expansion(mult=c(0,0)))+ scale_x_continuous(expand = expansion(add=c(0,0))) -> world.mapworld.map添加采样点
df<-read.csv("figure1df.csv")world.map+ geom_point(data = df, aes(x=Longitude, y=Latitude, colour = Process_type2), size=2)+ scale_color_manual(values = c("#3373a5","#97b1c0", "#f8ad63", "#d8191a", "#c4c4c4"))添加文本标签
library(ggtext) dftext<-data.frame( x=c(-180,-150,-10,100,50,-50), y=c(40,-50,-50,-50,50,60), label=c("**North america**<br>3 countries<br>107 cities<br>145WWTPs", "**South american**<br>2 countries<br>29 cities<br>38 WWTPs", 3,4,5,6))world.map01 + theme(legend.position = c(0.9,0.7), legend.background = element_rect(fill="transparent"), legend.box.background = element_rect(color="gray", fill="transparent"), legend.key = element_rect(fill="transparent"))+ geom_richtext(data=dftext, aes(x=x,y=y,label=label), nudge_x =0,hjust=0, fill="transparent")示例数据和代码可以直接到论文中去获取 大概给推文点赞,点击在看,然后留言获取
欢迎大家关注我的公众号
小明的数据分析条记本
小明的数据分析条记本 公众号 紧张分享:1、R语言和python做数据分析和数据可视化的简朴小例子;2、园艺植物干系转录组学、基因组学、群体遗传学文献阅读条记;3、生物信息学入门学习资料及自己的学习条记!
|