---
title: "RNAmodR.Data: example data for RNAmodR packages"
author: "Felix G.M. Ernst and Denis L.J. Lafontaine"
date: "`r Sys.Date()`"
package: RNAmodR.Data
output:
  BiocStyle::html_document:
    toc: true
    toc_float: true
    df_print: paged
vignette: >
  %\VignetteIndexEntry{RNAmodR.Data}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
bibliography: references.bib
---

```{r style, echo = FALSE, results = 'asis'}
BiocStyle::markdown(css.files = c('custom.css'))
```

# Available resources

`RNAmodR.Data` contains example data for the `RNAmodR` and related packages.
The data is provided as gff3, fasta and bam files.

Four sets of data with multiple files are included

```{r, echo=FALSE}
suppressPackageStartupMessages({
  library(RNAmodR.Data)
})
```
```{r, eval=FALSE}
library(RNAmodR.Data)
```

```{r}
eh <- ExperimentHub()
ExperimentHub::listResources(eh, "RNAmodR.Data")
```

These resources are grouped based on topic. Please have a look at the following
man pages:

- `?RNAmodR.Data.example` for general example data used for different purposes
- `?RNAmodR.Data.RMS` for example data for RiboMethSeq
- `?RNAmodR.Data.AAS` for example data for AlkAnilineSeq
- `?RNAmodR.Data.man` for small data set for man page examples
- `?RNAmodR.Data.snoRNAdb` for snoRNAdb as csv file

# snoRNAdb

`RNAmodR.Data.snoRNAdb` consists of a table containing the published data from 
the snoRNAdb [[@Lestrade.2006]](#References). The can be loaded as a GRanges 
object.

```{r, echo=FALSE}
suppressPackageStartupMessages({
  library(GenomicRanges)
})
```
```{r, eval=FALSE}
library(GenomicRanges)
```
```{r}
table <- read.csv2(RNAmodR.Data.snoRNAdb(), stringsAsFactors = FALSE)
head(table, n = 2)
# keep only the current coordinates
table <- table[,1:7]
snoRNAdb <- GRanges(seqnames = table$hgnc_symbol,
              ranges = IRanges(start = table$position, width = 1),strand = "+",
              type = "RNAMOD",
              mod = table$modification,
              Parent = table$hgnc_symbol,
              Activity = CharacterList(strsplit(table$guide,",")))
# convert to current gene name
snoRNAdb <- snoRNAdb[vapply(snoRNAdb$Activity != "unknown",all,logical(1)),]
snoRNAdb <- split(snoRNAdb,snoRNAdb$Parent)
head(snoRNAdb)
```

# Sessioninfo

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

<a name="References"></a>

# References
