Title: | 'WikiPathway' Based Data Integration and Visualization |
---|---|
Description: | Queries online 'WikiPathway' graphics and allows mapping user data (e.g., expression values) on the graph. The package designs a grammar of graphic syntax that using pipe operator to add graphic layer. |
Authors: | Guangchuang Yu [aut, cre, cph] , Yihao Chen [aut] |
Maintainer: | Guangchuang Yu <[email protected]> |
License: | Artistic-2.0 |
Version: | 0.1.5 |
Built: | 2024-10-26 04:41:12 UTC |
Source: | https://github.com/yulab-smu/wikiprofiler |
parse wikipathway gmt file to a gson object
read.wp(file)
read.wp(file)
file |
wikipathway gmt file downloaded from 'https://wikipathways-data.wmcloud.org/current/gmt/' |
a 'gson' object
Guangchuang Yu
Generate a color array.Fill the gene then generate the legend.
wp_bgfill( p, value, high = "red", low = "blue", legend = TRUE, legend_x = 0.001, legend_y = 0.94 )
wp_bgfill( p, value, high = "red", low = "blue", legend = TRUE, legend_x = 0.001, legend_y = 0.94 )
p |
p is |
value |
value is the amount of expression. |
high |
The color of highest gene. |
low |
The color of lowest gene. |
legend |
Whether you need legend. |
legend_x |
horizontal position of the legend |
legend_y |
vertical position of the legend |
A 'wpplot' object
Add use svghalo2 function to add halo.
wp_shadowtext(p, bg.r = 2, bg.col = "white")
wp_shadowtext(p, bg.r = 2, bg.col = "white")
p |
An wpplot class variance. |
bg.r |
The width of halo. |
bg.col |
The color of halo. |
A 'wpplot' object
Use wikipathways ID to open a local svg file. Then extract related information from svg file and build a wpplot class variance.
wpplot(ID)
wpplot(ID)
ID |
ID is wikipathways' ID. |
A 'wpplot' object
if (yulab.utils::has_internet()) wpplot('WP179')
if (yulab.utils::has_internet()) wpplot('WP179')
Save the 'wpplot' object to a file.
wpsave(p, file, width = NULL, height = NULL, ...)
wpsave(p, file, width = NULL, height = NULL, ...)
p |
A 'wpplot' object |
file |
the file to save the object |
width |
Width of the figure |
height |
Height of the figure |
... |
additional parameter passed to 'ggsave' |
output the file and the input 'wpplot' object (invisible)