---
title: "Lung Cancer"
output:
  html_vignette:
    mathjax: null
vignette: >
  %\VignetteIndexEntry{Lung Cancer}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
bibliography: cpdat.bib
csl: peerj.csl
---

```{r setup, include=FALSE}
library(canprot)
library(knitr)
## use pngquant to reduce size of PNG images
knit_hooks$set(pngquant = hook_pngquant)
pngquant <- "--speed=1 --quality=0-25"
# in case pngquant isn't available (R-Forge?)
if (!nzchar(Sys.which("pngquant"))) pngquant <- NULL 
# read 'basis' option
basis <- getOption("basis")
```

This vignette from the R package [canprot](https://github.com/jedick/canprot) version `r packageDescription("canprot")$Version` shows chemical metrics for proteins that are differentially expressed in lung cancer compared to normal tissue.
The analysis is described in more detail in a paper ([<span title="Water as a reactant in the differential expression of proteins in cancer">Dick, 2021</a>](https://doi.org/10.1002/cso2.1007)).
Abbreviations:

  * <i>Z</i><sub>C</sub> &ndash; average oxidation state of carbon.
  * <i>n</i><sub>H<sub>2</sub>O</sub> &ndash; stoichiometric hydration state per residue ([<span title="Uncovering chemical signatures of salinity gradients through compositional analysis of protein sequences">Dick et al., 2020</span>](https://doi.org/10.5194/bg-17-6145-2020)) computed using the **`r basis`** basis species (`r basis.text(basis)`, H~2~O, O~2~).

<style type="text/css">
body {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
</style>

```{r datasets}
datasets <- pdat_lung(2020)
```

```{r comptab, results="hide", message=FALSE, echo = FALSE}
pdat1 <- lapply(datasets, pdat_lung)
comptab1 <- lapply(pdat1, get_comptab)
comptab2 <- lapply(pdat1, get_comptab, "nAA", "MW")
```

Differences are calculated as (median value for up-regulated proteins) - (median value for down-regulated proteins).
Dashed lines enclose the 50% confidence region for highest probability density.

```{r diffplot, fig.width=5, fig.height=5, fig.align = "center", echo = FALSE, pngquant = pngquant}
par(mar = c(4, 4, 1, 1))
diffplot(comptab1, labtext = NA)
```

In the table, values of &Delta;<i>Z</i><sub>C</sub> and &Delta;<i>n</i><sub>H<sub>2</sub>O</sub> are multiplied by 1000, values of &Delta;MW are multiplied by 100, and negative values are shown in bold.
Abbreviations:

  * _n_~down~ &ndash; number of down-regulated proteins; _n_~up~ &ndash; number of up-regulated proteins; NSCLC &ndash; non-small cell lung cancer; SCC &ndash; squamous cell carcinoma; ADC &ndash; adenocarcinoma; ANT &ndash; adjacent or patient-matched normal (non-malignant, benign) tissue; NBE &ndash; normal bronchial epithelium; LCM &ndash; laser capture microdissection; FFPE &ndash; formalin-fixed paraffin-embedded.
  * <i>n</i><sub>AA</sub> &ndash; protein length; MW &ndash; molecular weight per residue.

```{r xsummary, results="asis", echo = FALSE}
library(xtable)
out <- xsummary2(comptab1, comptab2)
# round values and include dataset tags
tags <- sapply(sapply(strsplit(datasets, "="), "[", -1), paste, collapse = ";")
out <- cbind(out[, 1:2], tags = tags, out[, 3:16])
out[, 6:17] <- round(out[, 6:17], 4)
file <- paste0("lung_", basis, ".csv")
write.csv(out, file, row.names = FALSE, quote = 2)
```

## Data Sources
Where given, gene names or other identifiers were converted to UniProt accession numbers using the <a href="https://www.uniprot.org/mapping/">UniProt mapping tool</a>, except for IPI accession numbers, which were converted using the <a href="https://david-d.ncifcrf.gov/conversion.jsp">DAVID 6.7 conversion tool</a>.

__a__. Table 1 of @LXC+06.
__b__. __c__. Gene names from Tables II and III of @KHA+12.
__d__. Gene names from Table 2 of @YLL+12.
__e__. IPI numbers from Table 1 of @ZZD+12.
__f__. Table 2 of @ZZY+13.
__g__. Table 1 of @LLY+14.
__h__. Supplementary data 1b of @LWT+14.
__i__. Supplementary Data of @ZLH+14.
__j__. Gene names from Supporting Information Table S5 of @ZLS+14 (differential expression between normal endothelial cells and both paratumor and tumor endothelial cells).
__k__. Table S3 of @KNT+15 (LPIA: lepidic predominant invasive adenocarcinoma vs pN: pseudo-normal), filtered to include proteins with log~2~ fold change > 1 or < -1 and _p_-value < 0.05.
__l__. UniProt names from Table S2 of @BLL+16, filtered to include proteins with log~2~ fold change > 1.5 or < -1/1.5 and _p_-value < 0.05.
__m__. Gene names from Table S2 of @FGP+16.
__n__. Gene names from Table 1 of @JCP+16.
__o__. __p__. __q__. Supplemental Table S3B of @HHH+16 (primary tumor / normal comparison; pN0: no nodes involved; pN1: ipsilateral peribronchial/interlobar/hilar LN metastasis; pN2: ipsilateral mediastinal LN metastasis; M1: distant metastasis or malignant effusion).
__r__. Supplemental Table 2 of @TLB+16, filtered with adjusted _p_-value < 0.05 and fold change ≥ 1.5 or ≤ 2/3.
__s__. Gene names from Supplementary Table S1 of @FGW+17, filtered with _p_-value < 0.05.
__t__. Table 1 of @LZW+17.
__u__. Supplementary Table S2 of @SFS+17 (sheet LF: label-free quantification).
__v__. Supplementary Table 1 of @WLC+17.
__w__. __x__. __y__. __z__. __A__. __B__. Gene names from Tables S2--S6 of @YCC+17 filtered to keep proteins with fold change ≥1.5 or ≤2/3 (Oncogene: oncogene-coded proteins; TSG: tumor suppressor gene-coded proteins; Glycoprotein: glycoproteomics data).
__C__. __D__. Supplemental Table S2 of @KPS+20 for early (stage I-II) and advanced (stage III-IV) adenocarcinomas.
__E__. Gene names from Table S4D and UniProt IDs from Table S4A of @XZW+20.

## References
