![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
绘图
文章平均质量分 65
一个人旅行*-*
不想当医生的程序员不是个好厨子
展开
-
Pathview绘制KEGG通路图
Pathview包是最早在2013年发布的一个生信工具,该包的主要功能是基于基因通路的数据整合和可视化。用户只需要提供自定义的数据并指定目标通路,Pathview就可以自动下载相应的kegg路径图数据,解析数据文件,将用户数据映射和整合到通路上,并显示出通路图。,再提供了一个样本的基因数据和一个指定的KEGG通路的ID后,我们就得到了一副经典的KEGG通路图,并且通路图映射着该样本的基因表达量。该样本在该通路上基因的表达量映射在了相应基因处,此时展示的是基因的KEGG名称,而不是常规的Symbol。转载 2022-12-29 20:49:11 · 3217 阅读 · 0 评论 -
R语言Circos图可视化
R语言绘制circos heatmap转载 2022-10-08 14:05:55 · 2649 阅读 · 0 评论 -
R中绘制以特定数值为对称的colorbar
在绘制figure时,有连续性变量赋值时常常要用colorbar表示值的大小,如果有特殊的界值(如Pvalue1),需要将中间值单独设置个颜色作为区分。scales包中的scale_color_gradient2可以解决这个问题。原创 2022-08-09 14:51:44 · 962 阅读 · 0 评论 -
绘制confusion matrix的R实现
在评估分类器效果的时候,除了要呈现sensitivity,specificity,F1score等参数外,还需要图示confusion matrix的结果,以更直观地呈现结果。此为confusion matrix的表格,如何图示呢?先用caret包中的confusionMatrix函数构建matrix。1)自选函数。2)使用内置函数fourfoldplot。3)使用yardstick包......原创 2022-08-09 14:23:37 · 5464 阅读 · 0 评论 -
多分类RandomForest回归及ROC曲线绘制
require(multiROC)data(iris)head(iris)set.seed(123456)total_number <- nrow(iris)train_idx <- sample(total_number, round(total_number*0.6))train_df <- iris[train_idx, ]test_df <- iris[-train_idx, ]rf_res <- randomForest::randomFores.原创 2021-11-12 20:59:24 · 7494 阅读 · 3 评论 -
热图添加行标签
# data_ori <- "Grp_1;Grp_2;Grp_3;Grp_4;Grp_5# a;6.6;20.9;100.1;600.0;5.2# b;20.8;99.8;700.0;3.7;19.2# c;100.0;800.0;6.2;21.4;98.6# d;900;3.3;20.3;101.1;10000"## data <- read.table(text=data_ori, header=T, row.names=1, sep=";", quote="")# row_.原创 2021-08-21 09:06:42 · 1053 阅读 · 0 评论 -
趣味绘图-R绘制爱心及圣诞老人
library(ggwordcloud)#> Loading required package: ggplot2data("love_words_small")head(love_words_small)set.seed(42)ggplot(love_words_small, aes(label = word, size = speakers)) + geom_text_wordcloud() + scale_size_area(max_size = 40) + the..原创 2021-08-21 09:09:26 · 1212 阅读 · 0 评论 -
气球图R实现(ggballoonplot)
library(ggpubr)# Define color palettemy_cols <- c("#0D0887FF", "#6A00A8FF", "#B12A90FF", "#E16462FF", "#FCA636FF", "#F0F921FF")# Standard contingency table#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::# Read a contingency t...原创 2021-08-20 21:22:39 · 1673 阅读 · 0 评论 -
Upset plot的R实现
GitHub - hms-dbmi/UpSetR: An R implementation of the UpSet set visualization technique published by Lex, Gehlenborg, et al..Upset Plots | R-bloggers原创 2021-08-20 10:27:42 · 2372 阅读 · 0 评论