日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

好的beta多樣性排序圖可不是加一個(gè)置信橢圓就好了

 微生信生物 2021-01-16

寫在前面

降維排序分析微生物群落的beta多樣性,PCoA,NMDS,等都很常用。如果差異很明顯,那么這些點(diǎn)無論是如何排布,都是很清晰的。但是如果是結(jié)果不好的排序,點(diǎn)與點(diǎn)之間機(jī)會(huì)錯(cuò)綜復(fù)雜,亂七八糟的。那么·········· 對(duì)每個(gè)分組的點(diǎn)添加一個(gè)置信橢圓似乎是大部分人的做法,但是對(duì)于從總復(fù)雜的點(diǎn),遺憾的是作用很小。這里我們提供幾種方法。今天我?guī)Ыo大家?guī)追N高級(jí)方法,無論點(diǎn)有多亂,總可以有辦法區(qū)分。最近的一篇nature子刊就使用了其中一種方法。19年的nature子刊:Foliar-feeding insects acquire microbiomes from the soil rather than the host plant看上去樣本分離的不好,使用了這種方法。這種情況要使用橢圓圈起來就不行了

參考

食葉昆蟲微生物群落來源于土壤而不是取食植物

Foliar-feeding insects acquire microbiomes from the soil rather than the host plant

Nature Communications, [11.935]/doi.org/10.1038/s41467-019-09284-w Published online 02 August 2019 第一作者:S. Emilia Hannula1通訊作者:T. Martijn Bezemer email: m.bezemer@nioo.knaw.nl) 合作作者:Feng Zhu1,2, Robin Heinen1,3主要單位:1 荷蘭,陸地生態(tài)研究所, The Netherlands Institute of Ecology NIOO-KNAW, Droevendaalsesteeg 10, 6708 PB Wageningen, The Netherlands.2 農(nóng)業(yè)水資源重點(diǎn)實(shí)驗(yàn)室,河北省土壤生態(tài)重點(diǎn)實(shí)驗(yàn)室,農(nóng)業(yè)資源研究中心,中國科學(xué)院遺傳與發(fā)育生物學(xué)研究所。中國河北石家莊。

實(shí)戰(zhàn)

library('vegan')
library('ggplot2')
data(dune, dune.env)
#--------nmds排序函數(shù)#---
ord <- metaMDS(dune)
scrs <- scores(ord, display = 'sites')
# 組合排序坐標(biāo)和分組信息
scrs <- cbind(as.data.frame(scrs), Management = dune.env$Management)
# 求均值
cent <- aggregate(cbind(NMDS1, NMDS2) ~ Management, data = scrs, FUN = mean)
# 合并到樣本坐標(biāo)數(shù)據(jù)中
segs <- merge(scrs, setNames(cent, c('Management','oNMDS1','oNMDS2')),
by = 'Management', sort = FALSE)

出圖

ggplot(scrs, aes(x = NMDS1, y = NMDS2, colour = Management)) +
geom_point(data = cent, size = 3) + # centroids
geom_point() + # sample scores
coord_fixed() + # same axis scaling
theme_void()

置信橢圓

ggplot(scrs, aes(x = NMDS1, y = NMDS2, colour = Management)) +
geom_point(data = cent, size = 3) +
geom_point() +
coord_fixed() +
stat_ellipse( linetype = 2,level = 0.65,aes(group = Management, colour = Management)) +
theme_void()

連線放射

ggplot(scrs, aes(x = NMDS1, y = NMDS2, colour = Management)) +
geom_segment(data = segs,
mapping = aes(xend = oNMDS1, yend = oNMDS2)) + # spiders
geom_point(data = cent, size = 3) + # centroids
geom_point() + # sample scores
coord_fixed() + # same axis scaling
theme_void()

波普樣式

library(ggalt)
ggplot(scrs, aes(x = NMDS1, y = NMDS2, colour = Management)) +
geom_point(data = cent, size = 3) +
geom_point() +
coord_fixed() +
geom_bkde2d() +
theme_void()

外點(diǎn)連線

ggplot(scrs, aes(x = NMDS1, y = NMDS2, colour = Management)) +
geom_point(data = cent, size = 3) +
geom_point() +
coord_fixed() +
geom_encircle(s_shape=1, expand=0) +
theme_void()

    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多