BioCarta is a valuable source of biological pathways which not only provides well manually curated pathways, but also remarkably intuitive pathway images. One useful features of pathway analysis which is to highlight genes of interest on the pathway images has been lost. Since the original source of BioCarta (biocarte.com) is lost from the internet, we digged out the data from the internet archive and formatted it into a package.

Install

devtools::install_github("jokergoo/BioCartaImage")

Or use the BiocManager package:

BiocManager::install("BioCartaImage")

Usage

image

Highlight genes:

grid.newpage()
grid.biocarta("h_RELAPathway", color = c("1387" = "yellow"))

image

Add advanced graphics:

grob = biocartaGrob("h_RELAPathway")

grid.newpage()
grob4 = mark_gene(grob, "1387", function(x, y) {
    pos = pos_by_polygon(x, y)
    pushViewport(viewport(x = pos[1] - 10, y = pos[2], 
        width = unit(4, "cm"), height = unit(4, "cm"), 
        default.units = "native", just = "right"))
    grid.rect(gp = gpar(fill = "red"))
    grid.text("add whatever\nyou want here")
    popViewport()
}, capture = TRUE)
grid.draw(grob4)

image

License

MIT @ Zuguang Gu