• 主页
  • 课程

    关于课程

    • 课程归档
    • 成为一名讲师
    • 讲师信息
    教学以及管理操作教程

    教学以及管理操作教程

    ¥1,000.00 ¥100.00
    阅读更多
  • 特色
    • 展示
    • 关于我们
    • 问答
  • 事件
  • 个性化
  • 博客
  • 联系
  • 站点资源
    有任何问题吗?
    (00) 123 456 789
    weinfoadmin@weinformatics.cn
    注册登录
    恒诺新知
    • 主页
    • 课程

      关于课程

      • 课程归档
      • 成为一名讲师
      • 讲师信息
      教学以及管理操作教程

      教学以及管理操作教程

      ¥1,000.00 ¥100.00
      阅读更多
    • 特色
      • 展示
      • 关于我们
      • 问答
    • 事件
    • 个性化
    • 博客
    • 联系
    • 站点资源

      老俊俊的生信笔记

      • 首页
      • 博客
      • 老俊俊的生信笔记
      • tornadoplot 绘制富集热图

      tornadoplot 绘制富集热图

      • 发布者 weinfoadmin
      • 分类 老俊俊的生信笔记
      • 日期 2022年3月18日
      测试开头

      tornadoplot 绘制富集热图
      点击上方,关注老俊俊!

      1引言

      分享个小玩意, tornadoplot 用来绘制富集热图,输入 bigwig 文件和 peaks 文件即可。

      使用的是 ggplot 绘图系统。

      github 地址:

      https://github.com/teunbrand/tornadoplot

      tornadoplot 绘制富集热图

      2安装

      # install.packages("devtools")
      devtools::install_github("teunbrand/tornadoplot")

      3使用

      library(BiocFileCache)
      #> Loading required package: dbplyr
      bfc <- BiocFileCache()

      # Declare files
      # These bigwigs are derived from PMID: 28212747
      sources <- c(
        "sox2" = "http://dc2.cistrome.org/genome_browser/bw/73468_treat.bw",
        "oct4" = "http://dc2.cistrome.org/genome_browser/bw/73466_treat.bw"
      )

      # 设置样本名
      bigwigs <- setNames(bfcrpath(bfc, sources), c("Sox2 ChIP", "Oct4 ChIP"))

      peaks 文件处理代码:

      library(GenomicRanges)
      library(rtracklayer)

      # Files -------------------------------------------------------------------

      # These files were downloaded from cistrome: http://cistrome.org/db/#/
      # They are bed files from data deposited in GSE74112 from PMID: 28212747
      # The data is chromatin immunoprecipitation followed by sequencing (ChIP-seq),
      # where the proteins Sox2 and Oct4/Pou5f1 have been precipitated from
      # mouse embryonic stem cells (mESC).

      dir <- file.path("/DATA", "users", "t.vd.brand", "test_data")
      files <- file.path(
        dir,
        c("73466_peaks_oct4.bed",
          "73468_peaks_sox2.bed")
      )

      # Data import -------------------------------------------------------------

      si <- SeqinfoForUCSCGenome("mm10")
      si <- keepStandardChromosomes(si, "Mus_musculus")

      # We don't want any of the scaffold sequences

      bed <- lapply(files, import)
      bed <- lapply(bed, keepStandardChromosomes, "Mus_musculus", "coarse")
      bed <- as(bed, "GRangesList")
      bed <- setNames(bed, c("oct4", "sox2"))

      # We want to find sites where Sox2 and Oct4 co-bind and where they bind
      # uniquely.

      red <- reduce(stack(bed))
      red$sox2 <- overlapsAny(red, bed$sox2)
      red$oct4 <- overlapsAny(red, bed$oct4)
      red$cat <- ifelse(red$sox2 & red$oct4, "both",
                        ifelse(red$sox2, "sox2", "oct4"))
      red <- GRanges(seqnames(red), IRanges(start(red), end(red)),
                     seqinfo = si, cat = red$cat)

      # Choosing sites ----------------------------------------------------------

      set.seed(0)
      octsox_peaks <- GRangesList(
        Sox2 = sample(red[red$cat == "sox2"], 500),
        Oct4 = sample(red[red$cat == "oct4"], 500),
        Both = sample(red[red$cat == "both"], 500)
      )
      octsox_peaks <- sort(octsox_peaks)

      也可以拿网上的示例数据 Rdata,load 一下即可:

      https://github.com/teunbrand/tornadoplot/tree/master/data

      画图:

      library(tornadoplot)

      # These are a preprocessed set of ChIP-seq peaks
      feats <- octsox_peaks

      # Recall that the files are named, which the next function uses for labels
      bigwigs <- BigWigFileList(bigwigs)

      # Give the function locations and data
      tornado_plot(features = feats, data = bigwigs)
      tornadoplot 绘制富集热图

      看着 g 里 g 气的。



      tornadoplot 绘制富集热图


      欢迎加入生信交流群。加我微信我也拉你进 微信群聊 老俊俊生信交流群 哦,数据代码已上传至QQ群,欢迎加入下载。

      群二维码:

      tornadoplot 绘制富集热图


      老俊俊微信:


      tornadoplot 绘制富集热图

      知识星球:


      tornadoplot 绘制富集热图


      所以今天你学习了吗?

      欢迎小伙伴留言评论!

      点击我留言!

      今天的分享就到这里了,敬请期待下一篇!

      最后欢迎大家分享转发,您的点赞是对我的鼓励和肯定!

      如果觉得对您帮助很大,赏杯快乐水喝喝吧!



       往期回顾 




      ◀m6A metagene distribution 计算详解

      ◀跟着 nature cell biology 学绘图–小提琴图

      ◀跟着 CNS 学绘图–带阴影背景条形图

      ◀如何上传质谱数据到 ProteomeXchange 官网

      ◀epistack 优雅的可视化你的基因区域

      ◀python 学习之 pandas 读取文本数据

      ◀python 学习之 pandas 的基本功能–下

      ◀ribotish 质控结果复现及重新绘制

      ◀python 学习之 pandas 的基本功能–上

      ◀ggplot 绘制 CNS 级别漂亮峰图

      ◀...


      测试结尾

      请关注“恒诺新知”微信公众号,感谢“R语言“,”数据那些事儿“,”老俊俊的生信笔记“,”冷🈚️思“,“珞珈R”,“生信星球”的支持!

      • 分享:
      作者头像
      weinfoadmin

      上一篇文章

      m6A metagene distribution 计算详解
      2022年3月18日

      下一篇文章

      R语言学习:modelStudio,模型解释性分析
      2022年3月19日

      你可能也喜欢

      8-1651542331
      跟着Nature学绘图(2) 箱线图-累积分布曲线图
      2 5月, 2022
      9-1651542322
      Julia 笔记之字符串
      2 5月, 2022
      0-1651542343
      Julia 笔记之数学运算和初等函数
      1 5月, 2022

      搜索

      分类

      • R语言
      • TCGA数据挖掘
      • 单细胞RNA-seq测序
      • 在线会议直播预告与回放
      • 数据分析那些事儿分类
      • 未分类
      • 生信星球
      • 老俊俊的生信笔记

      投稿培训

      免费

      alphafold2培训

      免费

      群晖配置培训

      免费

      最新博文

      Nature | 单细胞技术揭示衰老细胞与肌肉再生
      301月2023
      lncRNA和miRNA生信分析系列讲座免费视频课和课件资源包,干货满满
      301月2023
      如何快速批量修改 Git 提交记录中的用户信息
      261月2023
      logo-eduma-the-best-lms-wordpress-theme

      (00) 123 456 789

      weinfoadmin@weinformatics.cn

      恒诺新知

      • 关于我们
      • 博客
      • 联系
      • 成为一名讲师

      链接

      • 课程
      • 事件
      • 展示
      • 问答

      支持

      • 文档
      • 论坛
      • 语言包
      • 发行状态

      推荐

      • iHub汉语代码托管
      • iLAB耗材管理
      • WooCommerce
      • 丁香园论坛

      weinformatics 即 恒诺新知。ICP备案号:粤ICP备19129767号

      • 关于我们
      • 博客
      • 联系
      • 成为一名讲师

      要成为一名讲师吗?

      加入数以千计的演讲者获得100%课时费!

      现在开始

      用你的站点账户登录

      忘记密码?

      还不是会员? 现在注册

      注册新帐户

      已经拥有注册账户? 现在登录

      close
      会员购买 你还没有登录,请先登录
      • ¥99 VIP-1个月
      • ¥199 VIP-半年
      • ¥299 VIP-1年
      在线支付 激活码

      立即支付
      支付宝
      微信支付
      请使用 支付宝 或 微信 扫码支付
      登录
      注册|忘记密码?