---
title: "Customize BioCarta Pathway Images"
author: "Zuguang Gu (z.gu@dkfz.de)"
date: '`r Sys.Date()`'
output:
BiocStyle::html_document:
toc: true
toc_depth: 2
vignette: >
%\VignetteIndexEntry{Customize BioCarta Pathway Images}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, eval = TRUE, echo = FALSE}
library(knitr)
knitr::opts_chunk$set(
fig.width = 7,
fig.height = 7,
error = FALSE,
tidy = FALSE,
message = FALSE,
crop = NULL
)
```
```{r, echo = FALSE}
knitr::knit_hooks$set(pngquant = knitr::hook_pngquant)
knitr::opts_chunk$set(
message = FALSE,
dev = "ragg_png",
fig.align = "center",
pngquant = "--speed=10 --quality=30"
)
```
# Introduction
BioCarta is a valuable source of biological pathways which not only provides
well manually curated pathways, but also remarkable and intuitive pathway images.
One useful features of pathway analysis which is to highlight genes of
interest on the pathway images is 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.
# Preprocessing
The BioCarta data is collected from
[web.archive.org](https://web.archive.org/web/20170122225118/https://cgap.nci.nih.gov/Pathways/BioCarta_Pathways).
This is an archive of BioCarta's successor website cgap.nci.nih.gov which is
also retired from internet. The snapshot was taken on 2017-01-22. The script is
also shipped in the package:
```{r}
system.file("script", "process.R", package = "BioCartaImage")
```
The core data of this package is the coordinates of proteins in the pathway images. This information
is included in the HTML code (in the `