... | ... |
@@ -1,26 +1,27 @@ |
1 |
-# History files |
|
2 |
-.Rhistory |
|
3 |
-.Rapp.history |
|
4 |
- |
|
5 |
-# Session Data files |
|
6 |
-.RData |
|
7 |
-# Example code in package build process |
|
8 |
-*-Ex.R |
|
9 |
-# Output files from R CMD build |
|
10 |
-/*.tar.gz |
|
11 |
-# Output files from R CMD check |
|
12 |
-/*.Rcheck/ |
|
13 |
-# RStudio files |
|
14 |
-.Rproj.user/ |
|
15 |
-# produced vignettes |
|
16 |
-vignettes/*.html |
|
17 |
-vignettes/*.pdf |
|
18 |
-# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 |
|
19 |
-.httr-oauth |
|
20 |
-# knitr and R markdown default cache directories |
|
21 |
-/*_cache/ |
|
22 |
-/cache/ |
|
23 |
-# Temporary files created by R markdown |
|
24 |
-*.utf8.md |
|
25 |
-*.knit.md |
|
26 |
-.Rproj.user |
|
1 |
+# History files |
|
2 |
+.Rhistory |
|
3 |
+.Rapp.history |
|
4 |
+ |
|
5 |
+# Session Data files |
|
6 |
+.RData |
|
7 |
+# Example code in package build process |
|
8 |
+*-Ex.R |
|
9 |
+# Output files from R CMD build |
|
10 |
+/*.tar.gz |
|
11 |
+# Output files from R CMD check |
|
12 |
+/*.Rcheck/ |
|
13 |
+# RStudio files |
|
14 |
+.Rproj.user/ |
|
15 |
+# produced vignettes |
|
16 |
+vignettes/*.html |
|
17 |
+vignettes/*.pdf |
|
18 |
+# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 |
|
19 |
+.httr-oauth |
|
20 |
+# knitr and R markdown default cache directories |
|
21 |
+/*_cache/ |
|
22 |
+/cache/ |
|
23 |
+# Temporary files created by R markdown |
|
24 |
+*.utf8.md |
|
25 |
+*.knit.md |
|
26 |
+.Rproj.user |
|
27 |
+inst/doc |
... | ... |
@@ -1,24 +1,25 @@ |
1 |
-Package: celda |
|
2 |
-Title: CEllular Latent Dirichlet Allocation |
|
3 |
-Version: 0.0.0.9000 |
|
4 |
-Authors@R: c(person("Joshua", "Campbell", email = "camp@bu.edu", role = c("aut", "cre")), |
|
5 |
- person("Sean", "Corbett", email = "scorebett@gmail.com", role = c("aut"))) |
|
6 |
-Description: celda leverages Bayesian hierarchical modeling to cluster genes, |
|
7 |
- cells, or both simultaneously from single cell sequencing data. |
|
8 |
-Depends: |
|
9 |
- R (>= 3.2.2) |
|
10 |
-Imports: |
|
11 |
- gtools, |
|
12 |
- entropy |
|
13 |
-Suggests: |
|
14 |
- testthat, |
|
15 |
- knitr, |
|
16 |
- roxygen2 |
|
17 |
-VignetteBuilder: |
|
18 |
- knitr |
|
19 |
-License: MIT |
|
20 |
-Encoding: UTF-8 |
|
21 |
-LazyData: true |
|
22 |
-RoxygenNote: 5.0.1 |
|
23 |
-BugReports: |
|
24 |
- https://github.com/definitelysean/celda/issues |
|
1 |
+Package: celda |
|
2 |
+Title: CEllular Latent Dirichlet Allocation |
|
3 |
+Version: 0.0.0.9000 |
|
4 |
+Authors@R: c(person("Joshua", "Campbell", email = "camp@bu.edu", role = c("aut", "cre")), |
|
5 |
+ person("Sean", "Corbett", email = "scorebett@gmail.com", role = c("aut"))) |
|
6 |
+Description: celda leverages Bayesian hierarchical modeling to cluster genes, |
|
7 |
+ cells, or both simultaneously from single cell sequencing data. |
|
8 |
+Depends: |
|
9 |
+ R (>= 3.2.2) |
|
10 |
+Imports: |
|
11 |
+ gtools, |
|
12 |
+ entropy |
|
13 |
+Suggests: |
|
14 |
+ testthat, |
|
15 |
+ knitr, |
|
16 |
+ roxygen2, |
|
17 |
+ rmarkdown |
|
18 |
+VignetteBuilder: |
|
19 |
+ knitr |
|
20 |
+License: MIT |
|
21 |
+Encoding: UTF-8 |
|
22 |
+LazyData: true |
|
23 |
+RoxygenNote: 5.0.1 |
|
24 |
+BugReports: |
|
25 |
+ https://github.com/definitelysean/celda/issues |
25 | 26 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,17 @@ |
1 |
+Version: 1.0 |
|
2 |
+ |
|
3 |
+RestoreWorkspace: Default |
|
4 |
+SaveWorkspace: Default |
|
5 |
+AlwaysSaveHistory: Default |
|
6 |
+ |
|
7 |
+EnableCodeIndexing: Yes |
|
8 |
+UseSpacesForTab: Yes |
|
9 |
+NumSpacesForTab: 2 |
|
10 |
+Encoding: UTF-8 |
|
11 |
+ |
|
12 |
+RnwWeave: Sweave |
|
13 |
+LaTeX: pdfLaTeX |
|
14 |
+ |
|
15 |
+BuildType: Package |
|
16 |
+PackageUseDevtools: Yes |
|
17 |
+PackageInstallArgs: --no-multiarch --with-keep.source |
... | ... |
@@ -1,32 +1,58 @@ |
1 | 1 |
--- |
2 | 2 |
title: "The Legend of celda" |
3 | 3 |
author: "Vignette Author" |
4 |
-date: "`r Sys.Date()`" |
|
4 |
+date: "`r Sys.Date()`" |
|
5 | 5 |
output: rmarkdown::html_vignette |
6 | 6 |
vignette: > |
7 | 7 |
%\VignetteIndexEntry{Vignette Title} |
8 | 8 |
%\VignetteEngine{knitr::rmarkdown} |
9 | 9 |
\usepackage[utf8]{inputenc} |
10 | 10 |
--- |
11 |
+ |
|
12 |
+## Overview |
|
13 |
+ |
|
14 |
+The purpose of this vignette is to briefly introduce package `celda`. `celda` is the abbreviation of "CELlular Latent Dirichlet Allocation." |
|
15 |
+ |
|
16 |
+It means that we implement Bayesian Hierarchical Modeling for Clustering Single-Cell RNA-Seq Data |
|
17 |
+ |
|
18 |
+To install `celda`: |
|
19 |
+ |
|
20 |
+```{r,eval=FALSE} |
|
21 |
+library(devtools) |
|
22 |
+install_github("definitelysean/celda") |
|
23 |
+``` |
|
24 |
+ |
|
25 |
+## Single-Cell RNA-Seq Data |
|
26 |
+ |
|
27 |
+ |
|
28 |
+## Latent Dirichlet allocation |
|
29 |
+ |
|
30 |
+In natural language processing, latent Dirichlet allocation (LDA) is a generative statistical model that allows sets of observations to be explained by unobserved groups that explain why some parts of the data are similar. |
|
31 |
+ |
|
32 |
+For example, if observations are words collected into documents, it posits that each document is a mixture of a small number of topics and that each word's creation is attributable to one of the document's topics. |
|
33 |
+ |
|
34 |
+LDA is an example of a topic model and was first presented as a graphical model for topic discovery by David Blei, Andrew Ng, and Michael I. Jordan in 2003. Essentially the same model was also proposed independently by J. K. Pritchard, M. Stephens, and P. Donnelly in the study of population genetics in 2000. Both papers have been highly influential, with 16488 and 18170 citations respectively by December 2016.([via](https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation)) |
|
35 |
+ |
|
36 |
+ |
|
37 |
+ |
|
38 |
+ |
|
39 |
+ |
|
11 | 40 |
```{r setup, include=FALSE} |
12 | 41 |
knitr::opts_chunk$set(echo = TRUE,fig.width=8,fig.height=7 , |
13 | 42 |
out.width="0.7\\linewidth", fig.align = "center") |
14 |
-oldpar <- par() |
|
15 |
-par(mar=c(3,3,2,1), mgp=c(2,.7,0), tck=-.01) |
|
43 |
+#oldpar <- par() |
|
44 |
+#par(mar=c(3,3,2,1), mgp=c(2,.7,0), tck=-.01) |
|
16 | 45 |
|
17 | 46 |
library(RColorBrewer) |
18 | 47 |
library(ggplot2) |
19 | 48 |
``` |
20 | 49 |
|
21 |
-# to be written |
|
22 | 50 |
|
23 |
-```{r} |
|
24 | 51 |
|
25 |
-``` |
|
26 | 52 |
|
27 | 53 |
|
28 | 54 |
|
29 | 55 |
```{r cleaning_up,echo=FALSE} |
30 |
-par(oldpar) |
|
31 |
-sessionInfo() |
|
56 |
+#par(oldpar) |
|
57 |
+#sessionInfo() |
|
32 | 58 |
``` |
33 | 59 |
\ No newline at end of file |
34 | 60 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,58 @@ |
1 |
+--- |
|
2 |
+title: "Vignette Title" |
|
3 |
+author: "Vignette Author" |
|
4 |
+date: "`r Sys.Date()`" |
|
5 |
+output: rmarkdown::html_vignette |
|
6 |
+vignette: > |
|
7 |
+ %\VignetteIndexEntry{Vignette Title} |
|
8 |
+ %\VignetteEngine{knitr::rmarkdown} |
|
9 |
+ %\VignetteEncoding{UTF-8} |
|
10 |
+--- |
|
11 |
+ |
|
12 |
+Vignettes are long form documentation commonly included in packages. Because they are part of the distribution of the package, they need to be as compact as possible. The `html_vignette` output type provides a custom style sheet (and tweaks some options) to ensure that the resulting html is as small as possible. The `html_vignette` format: |
|
13 |
+ |
|
14 |
+- Never uses retina figures |
|
15 |
+- Has a smaller default figure size |
|
16 |
+- Uses a custom CSS stylesheet instead of the default Twitter Bootstrap style |
|
17 |
+ |
|
18 |
+## Vignette Info |
|
19 |
+ |
|
20 |
+Note the various macros within the `vignette` section of the metadata block above. These are required in order to instruct R how to build the vignette. Note that you should change the `title` field and the `\VignetteIndexEntry` to match the title of your vignette. |
|
21 |
+ |
|
22 |
+## Styles |
|
23 |
+ |
|
24 |
+The `html_vignette` template includes a basic CSS theme. To override this theme you can specify your own CSS in the document metadata as follows: |
|
25 |
+ |
|
26 |
+ output: |
|
27 |
+ rmarkdown::html_vignette: |
|
28 |
+ css: mystyles.css |
|
29 |
+ |
|
30 |
+## Figures |
|
31 |
+ |
|
32 |
+The figure sizes have been customised so that you can easily put two images side-by-side. |
|
33 |
+ |
|
34 |
+```{r, fig.show='hold'} |
|
35 |
+plot(1:10) |
|
36 |
+plot(10:1) |
|
37 |
+``` |
|
38 |
+ |
|
39 |
+You can enable figure captions by `fig_caption: yes` in YAML: |
|
40 |
+ |
|
41 |
+ output: |
|
42 |
+ rmarkdown::html_vignette: |
|
43 |
+ fig_caption: yes |
|
44 |
+ |
|
45 |
+Then you can use the chunk option `fig.cap = "Your figure caption."` in **knitr**. |
|
46 |
+ |
|
47 |
+## More Examples |
|
48 |
+ |
|
49 |
+You can write math expressions, e.g. $Y = X\beta + \epsilon$, footnotes^[A footnote here.], and tables, e.g. using `knitr::kable()`. |
|
50 |
+ |
|
51 |
+```{r, echo=FALSE, results='asis'} |
|
52 |
+knitr::kable(head(mtcars, 10)) |
|
53 |
+``` |
|
54 |
+ |
|
55 |
+Also a quote using `>`: |
|
56 |
+ |
|
57 |
+> "He who gives up [code] safety for [code] speed deserves neither." |
|
58 |
+([via](https://twitter.com/hadleywickham/status/504368538874703872)) |