UpSetR

作者: 天道昭然 | 来源:发表于2020-03-05 18:08 被阅读0次
#install.packages("UpSetR")

library(UpSetR)



rt=read.table("asMatrix.txt",sep="\t",header=T,check.names=F,row.names=1)        #读取文件

gene=sapply(strsplit(rownames(rt),"\\|"),"[",1)

asType=sapply(strsplit(rownames(rt),"\\|"),"[",3)

upsetList=list(AA=unique(gene[asType=="AA"]),

              AD=unique(gene[asType=="AD"]),

              AP=unique(gene[asType=="AP"]),

              AT=unique(gene[asType=="AT"]),

              ES=unique(gene[asType=="ES"]),

              ME=unique(gene[asType=="ME"]),

              RI=unique(gene[asType=="RI"]) )

upsetData=fromList(upsetList)

pdf(file="upset.pdf",onefile = FALSE,width=9,height=6)              #保存图片

upset(upsetData,

      nsets = 7,                                    #展示可变剪切类型个数

      nintersects = 50,                            #展示基因集数目

      order.by = "freq",                            #按照数目排序

      show.numbers = "yes",                        #柱状图上方是否显示数值

      number.angles = 20,                          #字体角度

      point.size = 1.5,                            #点的大小

      matrix.color="red",                          #交集点颜色

      line.size = 0.8,                                #线条粗线

      mainbar.y.label = "Gene Intersections",

      sets.x.label = "Set Size")

dev.off()

相关文章

  • UpSetR

  • UpSetR

    R语言:排序、筛选以及分类汇总操作 https://blog.csdn.net/weixin_40628687/a...

  • UpSetR作图

    UpSetR的意义 做Venn图,在4个以下有较好的效果,而花瓣图则信息量较低,现在找到一种叫做UpSetR图(是...

  • UpSetR使用

    UpSetR:集合可视化神包进阶版Venn plotChIPseeker的upsetplot是怎么写的R语言中的色...

  • 利用UpsetR画图

    对于数据集合的可视化,韦恩图(venn diagram)是一种方式,一般集合不超过5个的时候,可视化效果还是不错的...

  • Upset plot多组取交集

    (113条消息) 进阶版Venn plot:Upset plot入门实战代码详解——UpSetR包介绍_ntuYi...

  • 2020-04-07 复合韦恩图包(ComplexUpset)

    此包兼有UpSetR的优点和ggplot2的可扩展性链接:https://github.com/krassowsk...

  • R语言可视化(十):集合图绘制

    10.UpSet集合图绘制 清除当前环境中的变量 设置工作目录 使用UpSetR包绘制集合图 基础绘图 使用set...

  • UpSetR:集合可视化神包

    对于集合的可视化,第一时间想到的都是韦恩图(venn diagram),一般集合不超过5个的时候,可视化效果还是不...

  • R-韦恩图系列-UpSetR

    R-韦恩图系列-ggVennDiagram - 简书 (jianshu.com)[https://www.jian...

网友评论

      本文标题:UpSetR

      本文链接:https://www.haomeiwen.com/subject/ntxcrhtx.html