pathview[1]是一个基于通路的可视化工具集。
首先安装pathview R package.

BiocManager::install("pathview")

使用内部数据快速开始

library(pathview)
data(gse16873.d)
library(pathview)
data(gse16873.d)
pv.out <- pathview(gene.data = gse16873.d[, 1], pathway.id = "04110",species = "hsa", gene.idtype ="entrez",out.suffix = "gse16873")

生信小木屋

上图中红色表示,相对于对照组,基因表达上调的基因,绿色表示基因表达下调的基因;颜色越深,基因上调或下调的倍数越高。

接下来,我们查看KEGG ID为04110所对应的KEGG名称

data(paths.hsa)
paths.hsa["hsa04110"]
# hsa04110: 'Cell cycle'

gse16873.d[, 1]的数据格式如下:

head(data.frame(gse16873.d[, 1]))

# 	gse16873.d[, 1]
# 10000	-0.30764480
# 10001	0.41586805
# 10002	0.19854925
# 10003	-0.23155297
# 100048912	-0.04490724
# 10004	-0.08756237

第一列为Entrez Gene的基因id,第二列为logFC

pathview 函数的输出结果pv.out如下,其中行表示映射的基因/化合物

kegg.nameslabelsall.mappedtypexywidthheightmol.datamol.col
1029CDKN2A1029gene53212446170.129198738972622#BEBEBE
51343FZR151343gene9195364617-0.404325630326951#5FDF5F
4171MCM24171,4172,4173,4174,4175,4176gene5535564617-0.420218063479512#5FDF5F
4998ORC14998,4999,5000,5001,23594,23595gene49455646170.986487281754076#FF0000
996CDC27996,8697,8881,10393,25847,25906,29882,51433gene91929746170.936301774095574#FF0000
996CDC27996,8697,8881,10393,25847,25906,29882,51433gene91951946170.936301774095574#FF0000

Compound and gene data

In examples above, we viewed gene data with canonical signaling pathways. We frequently want to look at metabolic pathways too.Besides gene nodes, these pathways also have compound nodes. Therefore, we may integrate or visualize both gene data and compound data with metabolic pathways. Here gene data is a broad concept including genes, transcripts, protein , enzymes and their expression, modifications and any measurable attributes. Same is compound data, including metabolites, drugs, their measurements and attributes.[1]

Here we use the breast cancer microarray dataset as gene data. We then generate simulated compound or metabolomic data, and load proper compound ID types (with sufficient number of unique entries) for demonstration.

# data(gene.idtype.list)
# gene.idtype.list
# data(bods)
# bods

  1. http://www.bioconductor.org/packages/release/bioc/vignettes/pathview/inst/doc/pathview.pdf