ggplot2 Manhattan Plots | ggmanh | ggplot画曼哈顿图
2023年11月08日
用TCGA的数据做了一个genome-wide的GSEA分析
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数据。
参考:
- How I Create Manhattan Plots Using ggplot
- http://localhost:17435/notebooks/tmpData/ApcKO_cellranger/psi/R_process.ipynb
标签:
绘图
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!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学习笔记