Skip to content

Commit

Permalink
add vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
whtns committed Mar 25, 2024
1 parent a9c1ae9 commit 53ed1c1
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.DS_Store
.quarto
*.Rproj
inst/doc
9 changes: 9 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,12 @@ Depends:
ExperimentHub
Imports:
utils
Suggests:
BiocStyle,
SingleCellExperiment,
knitr,
RefManageR,
rmarkdown,
sessioninfo,
testthat
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(human_gene_transcript_sce)
importFrom(ExperimentHub,createHubAccessors)
importFrom(utils,read.csv)
17 changes: 17 additions & 0 deletions man/human_gene_transcript_sce.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
176 changes: 176 additions & 0 deletions vignettes/human_gene_transcript_sce.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
---
title: "Human retinal organoid data"
author:
- name: Your name
affiliation:
- Your institution
email: [email protected]
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('chevreuldata')`"
vignette: >
%\VignetteIndexEntry{human_gene_transcript_sce}
%\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")
library(SingleCellExperiment)
## 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],
testthat = citation("testthat")[1],
chevreuldata = citation("chevreuldata")[1]
)
```

# Basics

## Install `chevreuldata`

`R` is an open-source statistical environment which can be easily modified to enhance its functionality via packages. `r Biocpkg("chevreuldata")` 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("chevreuldata")` by using the following commands in your `R` session:

```{r "install", eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("chevreuldata")
## Check that you have a valid Bioconductor installation
BiocManager::valid()
```

## Required knowledge

`r Biocpkg("chevreuldata")` is an `r Biocpkg("ExperimentHub")` based data package containing smart-seq based scRNA-seq data as a `r Biocpkg("SingleCellExperiment")` object from human retinal organoids. All included data is generated by the Cobrinik laboratory at Children's Hospital Los Angeles.

## Citing `chevreuldata`

We hope that `r Biocpkg("chevreuldata")` 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("chevreuldata")
```

# Quick start to using `chevreuldata`

```{r "start", message=FALSE}
library("chevreuldata")
```

To access data use helper functions as below

```{r}
chevreul_sce <- chevreuldata::human_gene_transcript_sce()
```

Data has been processed using the `r Biocpkg("chevreul")` package. Expression information is available for both gene (main experiment) and transcript (alt experiment) features

```{r}
mainExpName(chevreul_sce)
```

```{r}
altExpNames(chevreul_sce)
```

cell metadata includes organoid age `Age`, preparation method `Prep.Method`, and louvain clustering identities at multiple resolutions `gene_snn_res.x.x`

```{r}
colData(chevreul_sce)
```

For more information on data generation consult Shayler et al. https://www.biorxiv.org/content/10.1101/2023.02.28.530247v1

# Reproducibility

The `r Biocpkg("chevreuldata")` package `r Citep(bib[["chevreuldata"]])` 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"]])`
* `r CRANpkg("testthat")` `r Citep(bib[["testthat"]])`

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("human_gene_transcript_sce.Rmd", "BiocStyle::html_document"))
## Extract the R code
library("knitr")
knit("human_gene_transcript_sce.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"))
```

0 comments on commit 53ed1c1

Please sign in to comment.