PinPath is an R package for visualizing (omics) data onto pathway diagrams, and pinpoint where in the pathway the relevant changes occur. Results from (epi)genomics, transcriptomics, (phospho)proteomics, metabolomics and many more experiments can be visualized onto pathway diagrams from KEGG and WikiPathways. You can also use your own GPML and KGML files to visualize data onto custom pathways. As long as your data can be linked to genes, proteins, or metabolites, you can visualize it using PinPath.
Please visit our website for more information: SyNUM-lab.github.io/PinPath
Use the following R code to install the development version of PinPath:
# install "remotes" package
if (!require("remotes", quietly = TRUE))
install.packages("remotes")
# Install PinPath from GitHub
remotes::install_github("SyNUM-lab/PinPath") First, load necessary packages and data:
# Load packages
library(PinPath)
library(rWikiPathways)
library(org.Hs.eg.db)
# Load example data
lung_expr <- read.csv(
system.file("extdata", "data-lung-cancer.csv", package="PinPath"),
stringsAsFactors = FALSE)Now, you can plot the data onto the Non-small cell lung cancer (WP4255) pathway:
# Select pathway
infile <- rWikiPathways::getPathway("WP4255")
# Draw pathway
pathVis <- PinPath::drawGPML(
infile = infile,
annGenes = "org.Hs.eg.db",
inputDB = "ENSEMBL",
featureIDs = lung_expr$GeneID,
colorVar = lung_expr[,"log2FC"],
colorNames = "logFC",
nodeTable = TRUE,
legend = TRUE) You can find the file locations of the pathway and legend images in pathVis[["Pathway"]] and pathVis[["Legend"]], respectively.
You can also plot the pathway as a network:
pathVis <- PinPath::GPML2Network(
infile = infile,
annGenes = "org.Hs.eg.db",
inputDB = "ENSEMBL",
featureIDs = lung_expr$GeneID,
colorVar = lung_expr[,"log2FC"],
colorNames = "logFC",
nodeTable = TRUE,
legend = TRUE)
