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

```{r setup, include=FALSE}
library(canprot)
library(CHNOSZ)
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 
```

This vignette from the R package [canprot](https://github.com/jedick/canprot) version `r packageDescription("canprot")$Version` shows compositional metrics and phylostrata for proteins that are differentially expressed in prostate cancer compared to normal tissue.
Abbreviations:

  * <i>Z</i><sub>C</sub> &ndash; carbon oxidation state; <i>n</i><sub>H<sub>2</sub>O</sub> &ndash; stoichiometric hydration state per residue ([<span title="Distinct trends in chemical composition of proteins from metagenomes in redox and salinity gradients">Dick et al., 2020</span>](https://doi.org/10.1101/2020.04.01.020008); [<span title="Water as a reactant in the differential expression of proteins in cancer">Dick, 2020</a>](https://doi.org/10.1101/2020.04.09.035022)).
  * PS &ndash; phylostratum; <i>n</i><sub>AA</sub> &ndash; protein length; MW &ndash; molecular weight per residue.

Gene ages, expressed as phylostratum numbers, are taken from [<span title="Altered interactions between unicellular and multicellular genes drive hallmarks of transformation in a diverse range of solid tumors">Trigos et al., 2017</span>](https://doi.org/10.1073/pnas.1617743114) (TPPG17) or [<span title="Towards consensus gene ages ">Liebeskind et al, 2016</span>](https://doi.org/10.1093/gbe/evw113) (LMM16).

```{r options, echo=FALSE}
options(width = 90)
```

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

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

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

Differences are calculated as (median value for up-regulated proteins) - (median value for down-regulated proteins), except for phylostrata, where mean values are used.
Dashed lines enclose the 50% credible region for highest probability density.

```{r diffplot, fig.width=9, fig.height=8, fig.align = "center", echo = FALSE, pngquant = pngquant}
layout(matrix(c(0, 2, 1, 2, 1, 3, 0, 3), nrow = 2))
par(cex = 1, mar = c(4, 4, 1, 1), mgp = c(2.5, 1, 0))
diffplot(comptab1, labtext = NA)
diffplot(comptab2, c("PS_TPPG17", "PS_LMM16"))
diffplot(comptab3, c("nAA", "MW"), 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;PS and &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; PCa &ndash; prostate cancer; BPH &ndash; benign prostatic hyperplasia; FFPE &ndash; formalin-fixed paraffin-embedded; OCT &ndash; optimal cutting temperature compound-embedded; TMA &ndash; tissue microarray; GS &ndash; Gleason Score; CiRT &ndash; common internal retention time.

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

## Data Sources
Gene names or other identifiers were converted to UniProt accession numbers using the <a href="https://www.uniprot.org/mapping/">UniProt mapping tool</a>.

__a__. Table 2 of @GTR+08.
__b__. Supplementary Tables 3 and 4 of @KPB+10.
__c__. Table S2 of @HZH+12.
__d__. Table S1 of @JHZ+13.
__e__. Supplemental Table S7 of @LCS+14.
__f__. Supplementary Table 1 @CZL+16 (proteins recorded with only Down-regulation or Up-regulation).
__g__. Supplementary Table S3 of @IWT+16, filtered to include proteins listed with FDR < 0.1.
__h__. __i__. Extracted from Table S4 @GLZ+18. Values were quantile normalized, then ratios were calculated between the median values for each cancer type (acinar and ductal) and corresponding normal tissue; ratios > 1.5 or < 2/3 were used to identify differentially expressed proteins.
__j__. __k__. Extracted from Supplementary Data 1 of @LAJ+18 (sheet "Area-proteins") by applying quantile normalization to peak areas then calculating median values across all runs and samples for each of BPH , PC (primary prostate cancer), and CRPC (castration resistant prostate cancer). A cutoff of 2-fold in ratios of medians (PC / BPH or CRPC / BPH) was used to identify differentially expressed proteins.
__l__. Table 2 of @MAN+18.
__m__. __n__. __o__. __p__. __q__. Supporting Information Table S3 of @KRN+19 (G1--G5: PCa grades).
__r__. __s__. Tables S4d (GS = 6) and S4f (GS ≥ 8 or GS = 6) of @MMF+19 (GS: Gleason Score).
__t__. Supplementary Table S3a of @TOT+19.
__u__. __v__. Table S5 of @ZYW+19 (LG: low-grade PCa; HG: high-grade PCa).
__w__. Supplemental Table S2 of @KHN+20, filtered to include proteins with log~2~ fold change > 1 or < -1 in at least one experiment.
__x__. Table S2, Sheet D:S3-SWATH_protein_matrix of @SHC+20, filtered to include proteins quantified in at least 50% of both tumor and normal samples and with median fold change > 2 or < 0.5.
__y__. Supplementary Tables S3E--S3F of @ZZX+20.

## References
