<!--
%\VignetteEngine{knitr}
%\VignetteIndexEntry{tximport}
-->

# Exploring the GAlignmentPairs in alpineData

We first load the `alpineData` package:

```{r}
library(alpineData)
```

This package contains the following four *GAlignmentPairs* objects.
We can access these directly with named functions:

```{r}
ERR188297()
ERR188088()
ERR188204()
ERR188317()
```

Or we can access them using the *ExperimentHub* interface:

```{r}
eh <- ExperimentHub()
query(eh, "ERR188")
eh[["EH166"]]
```

For details on the source of these files, and on their construction
see `?alpineData` and the scripts:

* `inst/scripts/make-metadata.R`
* `inst/scripts/make-data.Rmd`

We can take a quick look at the paired alignments from one file.
For example their distribution on the different chromosomes:

```{r}
library(GenomicAlignments)
gap <- ERR188297()
barplot(sort(table(seqnames(gap))[1:25], decreasing=TRUE),
        las=3, main="Distribution of reads")
```

Histograms of read starts for the first read on chromosome 1: 

```{r}
gap1 <- gap[seqnames(gap) == "1"]
starts <- start(first(gap1))
par(mfrow=c(2,2))
hist(starts,col="grey")
```