---
title: "Secreted Proteins in Hypoxia"
output:
  html_vignette:
    mathjax: null
vignette: >
  %\VignetteIndexEntry{Secreted Proteins in Hypoxia}
  %\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 secreted proteins that are differentially expressed in hypoxia compared to control conditions.
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_secreted(2020)
```

```{r comptab, results="hide", message=FALSE, echo = FALSE}
pdat1 <- lapply(datasets, pdat_secreted)
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; pMSC &ndash; placental mesenchymal stem cells.
  * <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("secreted_", 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__. Tables 2 and 3 of @BRA+10.
__b__. __c__. Gene names from Supplementary Table S1 of @PTD+10, filtered with p-value < 0.05, expression ratio > 1.3 or < 1/1.3 and EF < 2.
__d__. Extracted from Supplementary Table SIII of @JVC+12: median values of peptide quantification (omitting proteins identified with less than 5 peptides that have different signs of log~2~ values); differentially expressed proteins identifed using a log~2~ cutoff of 0.2.
__e__. Extracted from Table 1 of @SKA+13, to include proteins exclusively identified in 1% or 8% O~2~.
__f__. __g__. Extracted from Table 1 of @SRS+13a, including unique proteins for 1%, 3%, and 8% O~2~.
__h__. GI numbers from Supplementary Data 6 of @LRS+14.
__i__. __j__. Extracted from Table S1 of @YKK+14, to include proteins identified by at least 2 unique peptides and surpassing a log~2~ cutoff of 0.5 in soluble or exosome fractions.
__k__. __l__. Gene names from Supplementary Information Table 1 of @CRS+15, filtered to include proteins with log~2~ fold change between air and hypoxia > 0.2 or < -0.2.
__m__. Gene names from Supporting Information Tables S1 (normoxic) and S2 (hypoxic) of @RTA+15, filtered to include proteins that were exclusively identified in either condition.
__n__. Gene names from Tables 1 and 2 of @RSE+16.
__o__. __p__. Extracted from Tables S2A (exosomes) and S2B (secretome) of @CGH+17, keeping proteins with FDR < 0.05.
__q__. Supplementary Tables S8-S9 (secretome) of @CLY+18.
__r__. Supplementary Table 1 of @DWW+18.
__s__. Table S2 of @FPR+18.
__t__. Supplementary Material Tables S1 and S2 of @ODS+18, filtered to include proteins exclusively identified in hypoxia or normoxia.
__u__. Supplementary Tables 1 and 2 of @CWG+19, filtered to include proteins uniquely identified in either hypoxia or normoxia.
__v__. Proteins identified as up- or down-regulated > 1 SD in Data File S1 of @KAN+19 (pooled data from sheets "Soluble Secretome" and "EVs").
__w__. __x__. Extracted from proteinGroups.txt in ProteomeXchange Dataset [PXD008104](http://ftp.pride.ebi.ac.uk/pride/data/archive/2019/03/PXD008104) [@NJVS19]. Expression ratios between hypoxia and normoxia were calculated from LFQ intensity values, and proteins were classified as up- or down-regulated if they had expression ratios > 1.2 or < 1/1.2 in all three experiments for one cell type (CAM or NTM). The Majority protein IDs and mean values of the expression ratios were saved in the data file.
__y__. Supplementary Table 2 of @PDT+19, filtered with log~2~ fold-change cutoff of 1.

## References
