---
title: "Breast Cancer"
output:
  html_vignette:
    mathjax: null
vignette: >
  %\VignetteIndexEntry{Breast 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 breast 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_breast(2020)
```

```{r comptab, results="hide", message=FALSE, echo = FALSE}
pdat1 <- lapply(datasets, pdat_breast)
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; T &ndash; tumor; N &ndash; normal; LCM &ndash; laser capture microdisecction; FFPE &ndash; formalin-fixed paraffin-embedded; IDC &ndash; infiltrating ductal carcinoma; DCIS &ndash; ductal carcinoma in situ; TNBC &ndash; triple-negative breast cancer.
  * <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("breast_", basis, ".csv")
write.csv(out, file, 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__. Extracted from Supporting Information RTF files of @AMG+08. Proteins identified by any number of peptides in both cancer and matched periphery were excluded; of the remaining proteins those identified by at least two peptides were used.
__b__. Table S2(a) of @CIR+10 (proteins differentially abundant at or above 99% confidence level).
__c__. Table 4 of @SRG+10.
__d__. Tables 1 and 2 of @HTP+11.
__e__. __f__. Supporting Table 6 of @GTM+12.
__g__. Table S1 of @LLL+13.
__h__. __i__. Table 2 of @SRS+13. For DCIS (3 patients), proteins were classified as up/down regulated if 2 or more ratios were greater/less than 1, and no ratios were less/greater than 1. For IC (4 patients), proteins were classified as up/down regulated if 3 or more ratios were greater/less than 1, and no ratios were less/greater than 1.
__j__. Extracted from Table S2 of @GSB+14. Values in all LFQ columns (distant, near, tumor) were quantile normalized, then the ratio between tumor and distant was calculated. Proteins with normalized LFQ ratios > 1.2 or < 1/1.2 and _p_-value < 0.05 were identified as differentially expressed.
__k__. Supplementary Tables 12, 13, 14 and 15 of @PPH+14, filtered to include proteins that are up- or down-regulated in all subtypes (LUM, LUMHER, HER, TN).
__l__. Supplemental Data S3 of @CVJ+15, filtered to include proteins with min and max credible intervals for expression ratios that are both <1 or >1.
__m__. __n__. Supplementary Table S3 of @PGT+16.
__o__. Table S4A of @PBR+16.
__p__. Supplemental Table 4 of @BST+17, filtered to include proteins with _p_-value < 2.
__q__. __r__. Tables S5-1 (differentially expressed proteins for 52 tumor / non-cancerous tissue pairs) and S5-2 (13 basal-like tumor / non-cancerous tissue pairs) of @TZD+18, filtered to include proteins with log~2~ fold change > 1 or < -1.
__s__. __t__. Supplementary File S1 of @GCS+19 (PT: primary breast tissue; NCT: non tumor contralateral breast tissue; ANT: non tumor adjacent breast tissue).
__u__. Supplementary Table 2 of @LLC+19.
__v__. __w__. Supplementary Tables S2 and S3 of @LLF+20.

## References
