---
title: "Annotated data sets contained in the `acnr` package"
author: "M. Pierre-Jean, P. Neuvial"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Annotated data sets contained in the `acnr` package}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include=FALSE}
library("knitr")
opts_chunk$set(
dev='png', fig.width=5, fig.height=5
)
```

The `acnr` package is a data package containing SNP array data from different platforms (Affymetrix and Immumina) and different types of copy-number regions. These regions were identified manually by the authors of the package and may be used to generate realistic data sets with known truth.

This package was initially built to serve as a data package for the `jointseg` package which is currently available from  [github](https://github.com/mpierrejean/jointseg).


Currently the `acnr` package contains three data sets curated from GEO:

```{r}
library("acnr")
dataSets <- listDataSets()
dataSets
```

This vignette provides basic summary statistics of these data sets. 


## Description of the annotated data sets

```{r}
tf <- 1
regList <- lapply(dataSets, FUN=function(ds) {
    regDat <- loadCnRegionData(dataSet=ds, tumorFraction=tf) 
    regs <- regDat[["region"]]
})
names(regList) <- dataSets

allregs <- unique(unlist(regList))
tab <- sapply(allregs, FUN=function(reg) {
    sapply(regList, FUN=function(rr) sum(rr==reg))
})
cap <- paste("Size of annotated copy-number regions for each of the", 
            length(dataSets), "data sets.")
knitr::kable(tab, caption=cap)
```

## Session information

```{r}
sessionInfo()
```

