Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
Pathview is an R/Bioconductor package for pathway-based data integration and visualization: it takes gene or compound data, maps it onto a KEGG pathway and draws the pathway with your values colour-coded on the nodes. This page is a short install-to-figure reference for lab and computational biology researchers. Facts were read from the Bioconductor package page, the package vignette and the 2013 Bioinformatics paper on 2026-11-08.
What Pathview is used for in research
Pathview overlays your own data, for example per-gene fold changes, on a pathway diagram so you can see which parts of a pathway change. The paper describes four modules (Downloader, Parser, Mapper and Viewer) and two kinds of output: a KEGG-native view and a Graphviz view. It is designed to work with other R/Bioconductor pathway tools, and the vignette shows a combined workflow with the gage package. Pathview draws figures; deciding which pathways to draw is a separate enrichment step, see GSEA and clusterProfiler.
How to install or access it
Pathview (version 1.52.0 in Bioconductor 3.23) is installed from Bioconductor:
if (!require("BiocManager", quietly=TRUE)) install.packages("BiocManager")
BiocManager::install("pathview")
Pathview downloads the pathway graph data it needs automatically. Open the documentation with browseVignettes("pathview") and get the citation text with citation("pathview").
KEGG data terms
The vignette notes that KEGG has required a subscription for FTP access since May 2011 and that its website data is freely available for academic and non-commercial use. Check KEGG’s own licence page for the terms that apply to your use; see also the KEGG dictionary entry and the KEGG pathway guide.
Step-by-step: draw your first KEGG pathway
The vignette quick start draws KEGG pathway 04110 for human (hsa) using the example data set gse16873.d.
- Load the package:
library(pathview) - Load the example data:
data(gse16873.d) - Run Pathview:
pv.out <- pathview(gene.data = gse16873.d[, 1], pathway.id = "04110", species = "hsa", out.suffix = "gse16873") - Find the result in your working directory (see the next section).
Arguments confirmed in the vignette
| Argument | What the vignette says or shows |
|---|---|
gene.data |
Your gene-level data (one column of the example matrix in the quick start). |
pathway.id |
The KEGG pathway number, for example “04110”. |
species |
KEGG species code, for example “hsa”. |
gene.idtype, cpd.idtype |
Declare the external ID types of your gene and compound data; these are the only ID specifications needed. |
out.suffix |
Text added to the output file name. |
same.layer |
Setting same.layer=F gives the two-layer graph (Graphviz view). |
limit |
Colour scale limit; limit=1 equals limit=list(gene=1, cpd=1). |
low, mid, high |
Colours for the scale; each accepts a one- or two-element vector. |
Output and how to read it
For the quick start the figure is named hsa04110.gse16873: species code and pathway number followed by your out.suffix. The native KEGG view is a raster image in a PNG file in your working directory. Your values are drawn as node colours on the pathway diagram, so read colour against the limit and low/mid/high settings you used rather than as raw numbers. With same.layer=F you get the Graphviz two-layer view instead of the native KEGG layout.
Troubleshooting
- Genes do not map: declare the ID type of your data with
gene.idtype(andcpd.idtypefor compounds), and make surespeciesmatches your organism. - Cannot find the output: the PNG is written to the current R working directory; check it with
getwd(). - Colours look saturated or flat: adjust
limitandlow/mid/high.
Free alternatives and related tools
| Tool | Relationship to Pathview |
|---|---|
| Reactome | A separate pathway knowledgebase, not KEGG-based. |
| MetaboAnalyst | A web platform for metabolomics analysis that includes pathway analysis. |
| clusterProfiler | R/Bioconductor enrichment analysis, used to decide which pathways to visualize. |
FAQ
What is Pathview?
An R/Bioconductor package for pathway-based data integration and visualization, described in Luo and Brouwer, Bioinformatics 29(14):1830-1831 (2013).
Which pathways can it draw?
KEGG pathways, selected with pathway.id and species.
How do I cite it?
Run citation("pathview") in R, or cite the 2013 paper (doi 10.1093/bioinformatics/btt285).







