---
title: "synaptome.data database for synaptome.db"
author: 
  - name: Oksana Sorokina
    affiliation: The School of Informatics, University of Edinburgh, Edinburgh, UK
    email: oksana.sorokina@ed.ac.uk
  - name: Anatoly Sorokin
    affiliation: Department of Biochemistry and Systems Biology, Institute of Systems, Molecular and Integrative Biology, University of Liverpool, UK
    email: a.sorokin@liverpool.ac.uk
  - name: J. Douglas Armstrong
    affiliation: The School of Informatics, University of Edinburgh, Edinburgh, UK
output: 
  BiocStyle::html_document:
    self_contained: yes
    toc: true
    toc_float: true
    toc_depth: 2
    code_folding: show
date: "`r doc_date()`"
package: "`r pkg_ver('synaptome.data')`"
vignette: >
  %\VignetteIndexEntry{data_vignette}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}  
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
    collapse = TRUE,
    comment = "#>",
    crop = NULL ## Related to https://stat.ethz.ch/pipermail/bioc-devel/2020-April/016656.html
)
```


```{r vignetteSetup, echo=FALSE, message=FALSE, warning = FALSE}
## Track time spent on making the vignette
startTime <- Sys.time()

## Bib setup
library("RefManageR")

## Write bibliography information
bib <- c(
    R = citation(),
    BiocStyle = citation("BiocStyle")[1],
    knitr = citation("knitr")[1],
    RefManageR = citation("RefManageR")[1],
    rmarkdown = citation("rmarkdown")[1],
    sessioninfo = citation("sessioninfo")[1],
    synaptome.data = citation("synaptome.data")[1]
)
```

# Basics

Genes encoding synaptic proteins are highly associated with neuronal disorders, many of which show clinical co-morbidity. Authors of `r Citep(bib[["synaptome.data"]])` integrated 58 published synaptic proteomic datasets that describe over 8000 proteins. They combined protein datasets with direct protein-protein interactions and functional metadata to build a database. Analysis of that database reveals the shared and unique protein components that underpin multiple disorders. The `synaptome.data` provides Bioconductor with access to the public version of that  database .

## Install `synaptome.data`

`R` is an open-source statistical environment which can be easily modified to enhance its functionality via packages. `r Biocpkg("synaptome.data")` is a `R` package available via the [Bioconductor](http://bioconductor.org) repository for packages. `R` can be installed on any operating system from [CRAN](https://cran.r-project.org/) after which you can install `r Biocpkg("synaptome.data")` by using the following commands in your `R` session:

```{r "install", eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
      install.packages("BiocManager")
  }

BiocManager::install("synaptome.data")

## Check that you have a valid Bioconductor installation
BiocManager::valid()
```

## Required knowledge

`r Biocpkg("synaptome.data")` is based on many other packages and in particular in those that have implemented the infrastructure needed for dealing with RNA-seq data (EDIT!). That is, packages like `r Biocpkg("SummarizedExperiment")` (EDIT!).

If you are asking yourself the question "Where do I start using Bioconductor?" you might be interested in [this blog post](http://lcolladotor.github.io/2014/10/16/startbioc/#.VkOKbq6rRuU).

## Asking for help

As package developers, we try to explain clearly how to use our packages and in which order to use the functions. But `R` and `Bioconductor` have a steep learning curve so it is critical to learn where to ask for help. The blog post quoted above mentions some but we would like to highlight the [Bioconductor support site](https://support.bioconductor.org/) as the main resource for getting help: remember to use the `synaptome.data` tag and check [the older posts](https://support.bioconductor.org/t/synaptome.data/). Other alternatives are available such as creating GitHub issues and tweeting. However, please note that if you want to receive help you should adhere to the [posting guidelines](http://www.bioconductor.org/help/support/posting-guide/). It is particularly critical that you provide a small reproducible example and your session information so package developers can track down the source of the error.

## Citing `synaptome.data`

We hope that `r Biocpkg("synaptome.data")` will be useful for your research. Please use the following information to cite the package and the overall approach. Thank you!

```{r "citation"}
## Citation info
citation("synaptome.data")
```

# Quick start to using to `synaptome.data`

```{r "start", message=FALSE, eval=FALSE}
library("synaptome.data")
ahub <- AnnotationHub::AnnotationHub(hub='http://127.0.0.1:9393/')
sdb<-AnnotationHub::query(ahub,'SynaptomeDB')
```

Here is an example of you can cite your package inside the vignette:

* `r Biocpkg("synaptome.data")` `r Citep(bib[["synaptome.data"]])`



# Reproducibility

The `r Biocpkg("synaptome.data")` package `r Citep(bib[["synaptome.data"]])` was made possible thanks to:

* R `r Citep(bib[["R"]])`
* `r Biocpkg("BiocStyle")` `r Citep(bib[["BiocStyle"]])`
* `r CRANpkg("knitr")` `r Citep(bib[["knitr"]])`
* `r CRANpkg("RefManageR")` `r Citep(bib[["RefManageR"]])`
* `r CRANpkg("rmarkdown")` `r Citep(bib[["rmarkdown"]])`
* `r CRANpkg("sessioninfo")` `r Citep(bib[["sessioninfo"]])`

This package was developed using `r BiocStyle::Biocpkg("biocthis")`.


Code for creating the vignette

```{r createVignette, eval=FALSE}
## Create the vignette
library("rmarkdown")
system.time(render("data_vignette.Rmd", "BiocStyle::html_document"))

## Extract the R code
library("knitr")
knit("data_vignette.Rmd", tangle = TRUE)
```

Date the vignette was generated.

```{r reproduce1, echo=FALSE}
## Date the vignette was generated
Sys.time()
```

Wallclock time spent generating the vignette.

```{r reproduce2, echo=FALSE}
## Processing time in seconds
totalTime <- diff(c(startTime, Sys.time()))
round(totalTime, digits = 3)
```

`R` session information.

```{r reproduce3, echo=FALSE}
## Session info
library("sessioninfo")
options(width = 120)
session_info()
```



# Bibliography

This vignette was generated using `r Biocpkg("BiocStyle")` `r Citep(bib[["BiocStyle"]])`
with `r CRANpkg("knitr")` `r Citep(bib[["knitr"]])` and `r CRANpkg("rmarkdown")` `r Citep(bib[["rmarkdown"]])` running behind the scenes.

Citations made with `r CRANpkg("RefManageR")` `r Citep(bib[["RefManageR"]])`.

```{r vignetteBiblio, results = "asis", echo = FALSE, warning = FALSE, message = FALSE}
## Print bibliography
PrintBibliography(bib, .opts = list(hyperlink = "to.doc", style = "html"))
```
