这个工具出手就是CNS级水准!师妹师弟都在偷偷用!
分享一个强大的R工具—ggNetView,它提供灵活且符合publication-ready标准的工具,专门用于network分析与可视化,少量代码完成复杂任务。
使用一下ggNetView
link_heatmaps
如果感觉之前分享的Mantel test相关性网络Heatmap不能满足要求0基础速通,这款顶刊人手一份的Mantel检验,
可以试试它,
gglink_heatmaps(
env = Envdf_4st,
spec = Spedf,
env_select = list(Env01 = 1:14,
Env02 = 15:28,
Env03 = 29:42,
Env04 = 43:56),
spec_select = list(Spec01 = 1:8),
relation_method = "correlation",
spec_layout = "circle_outline",
cor.method = "pearson",
cor.use = "pairwise",
r = 6,
distance = 1,
orientation = c("top_right", "bottom_right", "top_left", "bottom_left")
)
Basic network plot
ggNetView(
graph_obj = obj,
layout = "gephi",
layout.module = "adjacent",
group.by = "Modularity",
fill.by = "Modularity",
pointsize = c(1, 5),
center = F,
jitter = F,
mapping_line = F,
shrink = 0.9,
linealpha = 0.2,
linecolor = "#d9d9d9"
)
添加注释、配色等信息
ggNetView(
graph_obj = obj,
layout = "gephi",
layout.module = "adjacent",
group.by = "Modularity",
fill.by = "Modularity",
pointsize = c(1, 5),
center = F,
jitter = TRUE,
jitter_sd = 0.15,
mapping_line = TRUE,
shrink = 0.9,
linealpha = 0.2,
linecolor = "#d9d9d9",
add_outer = T,
label = T,
pointlabel = "top1"
)
更多。。。。。。:https://github.com/Jiawang1209/ggNetView
(加入学习,收费,备注:299)