| Title: | Visualization of Omics Data on Pathway Diagrams |
|---|---|
| Description: | With PinPath, you can visualize omics data onto pathways diagrams from WikiPathways and KEGG. |
| Authors: | Jarno Koetsier [aut, cre] (ORCID: <https://orcid.org/0000-0002-7981-1345>), Lars Eijssen [aut] (ORCID: <https://orcid.org/0000-0002-6473-2839>), Egon Willighagen [aut] (ORCID: <https://orcid.org/0000-0001-7542-0286>), Stichting Terre - The Dutch Rett Syndrome Foundation [fnd] |
| Maintainer: | Jarno Koetsier <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.3 |
| Built: | 2026-06-02 23:39:09 UTC |
| Source: | https://github.com/bioc/PinPath |
This function makes default list that can be used to set the node colors in the pathway diagram.
defaultColorList(ColorVar, ColorNames = NULL)defaultColorList(ColorVar, ColorNames = NULL)
ColorVar |
|
ColorNames |
(optional) |
For both divergent and sequential color scales,
values outside the specified range (minVal to maxVal)
are clipped and mapped to the colors corresponding to the
minimum (minCol) or maximum (maxCol).
A list that can be provided to drawGPML to set the node colors in the pathway diagram.
# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Set significance as a binary variable lung_expr$Significant <- ifelse(lung_expr$adj.P.Value < 0.05, "Yes", "No") # Make default color list colorList <- PinPath::defaultColorList( lung_expr[,c("log2FC", "Significant")])# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Set significance as a binary variable lung_expr$Significant <- ifelse(lung_expr$adj.P.Value < 0.05, "Yes", "No") # Make default color list colorList <- PinPath::defaultColorList( lung_expr[,c("log2FC", "Significant")])
This function draws a pathway from a GPML file with the option to map, e.g., expression data onto the pathway diagram.
drawGPML( infile, outdir = getwd(), outname = NULL, featureIDs = NULL, colorVar = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )drawGPML( infile, outdir = getwd(), outname = NULL, featureIDs = NULL, colorVar = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )
infile |
Input GPML file. This can be a character string of the GPML file location (e.g., "Downloads/WP42500.gpml") or a GPML string provided by [rWikiPathways::getPathway]. |
outdir |
(optional) Output directory. The pathway and legend images will be saved in this directory. |
outname |
(optional) The file name of the output pathway image. "svg","png",and "pdf" file extensions are accepted. If no file extension is specified, the pathway and legend image will be generated in .svg format. The legend file gets the "legend_" prefix. |
featureIDs |
(optional) |
colorVar |
(optional) |
annGenes |
(optional) |
annMetabolites |
(optional) |
inputDB |
(optional) Input gene ID type (SYMBOL, ENTREZID, ENSEMBL,
UNIPROT).
This can be a |
colorNames |
(optional) |
colorList |
(optional) A list with information about the coloring of the nodes. An example can be generated using the defaultColorList function. |
NAvalue |
(optional) Node color for |
legend |
(optional) Logical (TRUE or FALSE). Should the legend be plotted? |
nodeTable |
(optional) Logical (TRUE or FALSE). Should a node table be returned? |
pathInfo |
(optional) Logical (TRUE or FALSE). Should pathway information be returned? |
openFile |
(optional) Logical (TRUE or FALSE). Should the pathway file be opened after it has been saved? This option only works for Windows users. |
A list with the node table and the file location of the
pathway and legend image.
# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway infile <- rWikiPathways::getPathway("WP4255") # Draw pathway pathVis <- PinPath::drawGPML( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway infile <- rWikiPathways::getPathway("WP4255") # Draw pathway pathVis <- PinPath::drawGPML( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically
This function draws a pathway from a KGML file with the option to map, e.g., expression data onto the pathway diagram.
drawKGML( infile, outdir = getwd(), outname = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, featureIDs = NULL, colorVar = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )drawKGML( infile, outdir = getwd(), outname = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, featureIDs = NULL, colorVar = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )
infile |
Input KGML file. This can be a character string of the KGML file location (e.g., "Downloads/WP42500.KGML"). |
outdir |
(optional) Output directory. The pathway and legend images will be saved in this directory. |
outname |
(optional) The file name of the output pathway image. "svg","png",and "pdf" file extensions are accepted. If no file extension is specified, the pathway and legend image will be generated in .svg format. The legend file gets the "legend_" prefix. |
annGenes |
(optional) |
annMetabolites |
(optional) |
inputDB |
(optional) Input gene ID type
(SYMBOL, ENTREZID, ENSEMBL, UNIPROT). This can be a |
featureIDs |
(optional) |
colorVar |
(optional) |
colorNames |
(optional) |
colorList |
(optional) A list with information about the coloring of the nodes. An example can be generated using the defaultColorList function. |
NAvalue |
(optional) Node color for |
legend |
(optional) Logical (TRUE or FALSE). Should the legend be plotted? |
nodeTable |
(optional) Logical (TRUE or FALSE). Should a node table be returned? |
pathInfo |
(optional) Logical (TRUE or FALSE). Should pathway information be returned? |
openFile |
(optional) Logical (TRUE or FALSE). Should the pathway file be opened after it has been saved? This option only works for Windows users. |
A list with the node table and the file location of the
pathway and legend image.
# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway pathway_id <- "hsa05223" bfc <- BiocFileCache::BiocFileCache() infile <- BiocFileCache::bfcrpath(bfc, paste0("https://rest.kegg.jp/get/",pathway_id,"/kgml")) # Draw pathway pathVis <- PinPath::drawKGML( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway pathway_id <- "hsa05223" bfc <- BiocFileCache::BiocFileCache() infile <- BiocFileCache::bfcrpath(bfc, paste0("https://rest.kegg.jp/get/",pathway_id,"/kgml")) # Draw pathway pathVis <- PinPath::drawKGML( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically
This function draws a network from a GPML file with the option to map, e.g., expression data onto the network diagram.
GPML2Network( infile, outdir = getwd(), outname = NULL, featureIDs = NULL, colorVar = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", layout = "nicely", unconnectedNodes = FALSE, alpha = 0.9, nodeSize = 1, legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )GPML2Network( infile, outdir = getwd(), outname = NULL, featureIDs = NULL, colorVar = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", layout = "nicely", unconnectedNodes = FALSE, alpha = 0.9, nodeSize = 1, legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )
infile |
Input GPML file. This can be a character string of the GPML file location (e.g., "Downloads/WP42500.gpml") or a GPML string provided by [rWikiPathways::getPathway]. |
outdir |
(optional) Output directory. The pathway and legend images will be saved in this directory. |
outname |
(optional) The file name of the output pathway image. "svg","png",and "pdf" file extensions are accepted. If no file extension is specified, the pathway and legend image will be generated in .svg format. The legend file gets the "legend_" prefix. |
featureIDs |
(optional) |
colorVar |
(optional) |
annGenes |
(optional) |
annMetabolites |
(optional) |
inputDB |
(optional) Input gene ID type
(SYMBOL, ENTREZID, ENSEMBL, UNIPROT).
This can be a |
colorNames |
(optional) |
colorList |
(optional) A list with information about the coloring of the nodes. An example can be generated using the defaultColorList function. |
NAvalue |
(optional) Node color for |
layout |
(optional) Network layout from igraph. |
unconnectedNodes |
(optional) Logical (TRUE or FALSE). Should unconnected (isolated) nodes be shown in the network? |
alpha |
(optional) Transparency of the nodes. |
nodeSize |
(optional) Size of the nodes. |
legend |
(optional) Logical (TRUE or FALSE). Should the legend be plotted? |
nodeTable |
(optional) Logical (TRUE or FALSE). Should a node table be returned? |
pathInfo |
(optional) Logical (TRUE or FALSE). Should pathway information be returned? |
openFile |
(optional) Logical (TRUE or FALSE). Should the pathway file be opened after it has been saved? This option only works for Windows users. |
A list with the node table and the file location of the
pathway and legend image.
# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway infile <- rWikiPathways::getPathway("WP4255") # Draw pathway pathVis <- PinPath::GPML2Network( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway infile <- rWikiPathways::getPathway("WP4255") # Draw pathway pathVis <- PinPath::GPML2Network( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically
This function draws a pathway from a KGML file with the option to map, e.g., expression data onto the pathway diagram.
KGML2Network( infile, outdir = getwd(), outname = NULL, featureIDs = NULL, colorVar = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", layout = "nicely", unconnectedNodes = FALSE, alpha = 0.9, nodeSize = 1, legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )KGML2Network( infile, outdir = getwd(), outname = NULL, featureIDs = NULL, colorVar = NULL, annGenes = NULL, annMetabolites = NULL, inputDB = NULL, colorNames = NULL, colorList = NULL, NAvalue = "#F0F0F0", layout = "nicely", unconnectedNodes = FALSE, alpha = 0.9, nodeSize = 1, legend = FALSE, nodeTable = FALSE, pathInfo = FALSE, openFile = FALSE )
infile |
Input KGML file. This can be a character string of the KGML file location (e.g., "Downloads/WP42500.KGML"). |
outdir |
(optional) Output directory. The pathway and legend images will be saved in this directory. |
outname |
(optional) The file name of the output pathway image. "svg","png",and "pdf" file extensions are accepted. If no file extension is specified, the pathway and legend image will be generated in .svg format. The legend file gets the "legend_" prefix. |
featureIDs |
(optional) |
colorVar |
(optional) |
annGenes |
(optional) |
annMetabolites |
(optional) |
inputDB |
(optional) Input gene ID type
(SYMBOL, ENTREZID, ENSEMBL, UNIPROT). This can be a |
colorNames |
(optional) |
colorList |
(optional) A list with information about the coloring of the nodes. An example can be generated using the defaultColorList function. |
NAvalue |
(optional) Node color for |
layout |
(optional) Network layout from igraph. |
unconnectedNodes |
(optional) Logical (TRUE or FALSE). Should unconnected (isolated) nodes be shown in the network? |
alpha |
(optional) Transparency of the nodes. |
nodeSize |
(optional) Size of the nodes. |
legend |
(optional) Logical (TRUE or FALSE). Should the legend be plotted? |
nodeTable |
(optional) Logical (TRUE or FALSE). Should a node table be returned? |
pathInfo |
(optional) Logical (TRUE or FALSE). Should pathway information be returned? |
openFile |
(optional) Logical (TRUE or FALSE). Should the pathway file be opened after it has been saved? This option only works for Windows users. |
A list with the node table and the file location of the
pathway and legend image.
# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway pathway_id <- "hsa05223" bfc <- BiocFileCache::BiocFileCache() infile <- BiocFileCache::bfcrpath(bfc, paste0("https://rest.kegg.jp/get/",pathway_id,"/kgml")) # Draw pathway pathVis <- PinPath::KGML2Network( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically# Load example data lung_expr <- read.csv(system.file( "extdata","data-lung-cancer.csv", package="PinPath"), stringsAsFactors = FALSE) # Select pathway pathway_id <- "hsa05223" bfc <- BiocFileCache::BiocFileCache() infile <- BiocFileCache::bfcrpath(bfc, paste0("https://rest.kegg.jp/get/",pathway_id,"/kgml")) # Draw pathway pathVis <- PinPath::KGML2Network( infile = infile, outdir = tempdir(), annGenes = "org.Hs.eg.db", inputDB = "ENSEMBL", featureIDs = lung_expr$GeneID, colorVar = lung_expr[,"log2FC"], nodeTable = TRUE, legend = TRUE, openFile = FALSE) # <-- set to TRUE to open the image automatically