ggplot2 Manhattan Plots | ggmanh | ggplot画曼哈顿图

 

2023年11月08日

用TCGA的数据做了一个genome-wide的GSEA分析

Guide to ggmanh Package

 

1
2
library(ggmanh)
library(SeqArray)

  

只需要把gene转化为chr和position即可

1
2
3
4
5
6
7
8
9
10
hg38.anno <- read.csv("https://github.com/leezx/RToolbox/raw/master/data/gene.anno.GRCh38.ensembl90.csv", sep = ";", header = F)
hg38.anno <- hg38.anno[!duplicated(hg38.anno$V9),]
 
rownames(hg38.anno) <- hg38.anno$V9
 
stem.gsea$chromosome <- hg38.anno[rownames(stem.gsea),]$V1
stem.gsea$position <- hg38.anno[rownames(stem.gsea),]$V3
 
diff.gsea$chromosome <- hg38.anno[rownames(diff.gsea),]$V1
diff.gsea$position <- hg38.anno[rownames(diff.gsea),]$V3

 

1
2
stem.gsea <- subset(stem.gsea, chromosome %in% c(1:22,"X"))
stem.gsea$chromosome <- factor(stem.gsea$chromosome, c(1:22,"X"))  
1
2
3
4
options(repr.plot.width=7, repr.plot.height=4)
g <- manhattan_plot(x = stem.gsea, pval.colname = "stem_pvalue", chr.colname = "chromosome", pos.colname = "position",
                    plot.title = "Genome-wide GSEA analysis (stem signature)", y.label = "-log10(P value)")
g

 

参考:http://localhost:17435/notebooks/data_center/public_DB/DB-TCGA-CCLE-GTEx.ipynb

 


 

最经典的一种genome wide图形,可以显示全基因组的hit。

GWAS的数据

需要里面的Chr,start,bp_cum,以及最核心的p-value。

 

我准备的CRIPSR screen数据。

 

 

 

 

 

参考:

 

posted @   Life·Intelligence  阅读(105)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
历史上的今天:
2017-06-20 16S 基础知识、分析工具和分析流程详解
2017-06-20 Django MySQL数据库操作
2016-06-20 比对工具之 BWA 使用方法
2016-06-20 项目一:使用二代测序数据进行基因组组装(局部组装)
2016-06-20 Linux 打包和压缩 方法详解
2016-06-20 python学习笔记
TOP
点击右上角即可分享
微信分享提示