-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
executable file
·98 lines (63 loc) · 4.03 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[![Travis build status](https://travis-ci.org/marionlouveaux/cellviz3d.svg?branch=master)](https://travis-ci.org/marionlouveaux/cellviz3d) [![Build status](https://ci.appveyor.com/api/projects/status/c3gwf6x0l1afabie?svg=true)](https://ci.appveyor.com/project/marionlouveaux/cellviz3d) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1467416.svg)](https://doi.org/10.5281/zenodo.1467416)
# cellviz3d
The goal of {cellviz3d} is to propose visualisation of meshes created from the segmentation of 3D/4D microscopic images, and point clouds. In particular, it helps visualising meshes from MorphographX, in combination with [{mgx2r}](https://github.com/marionlouveaux/mgx2r), or point clouds from the [MaMuT Fiji plugin](https://imagej.net/MaMuT), in combination with {mamut2r}.
## How to cite
To cite {cellviz3d}, call the R built-in command `citation("cellviz3d")`.
> Marion Louveaux. (2018, October 19). cellviz3d: a R package for the 3D and 4D interactive visualization of cells and biological tissues (Version v0.0.2). Zenodo. http://doi.org/10.5281/zenodo.1467416
## Installation
You can install the released version of {cellviz3d} from [Github](https://github.com/marionlouveaux/cellviz3d) with:
``` r
# install.packages("devtools")
devtools::install_github("marionlouveaux/cellviz3d")
# With vignettes
devtools::install_github("marionlouveaux/cellviz3d", build_vignettes = TRUE)
```
## Full documentation with {pkgdown}
See full documentation created with {pkgdown} at https://marionlouveaux.github.io/cellviz3d/
## Vignette
A vignette is available in the package if you built it during installation with `build_vignettes = TRUE`:
- `vignette("cellviz3d-mgx_meshes", package = "cellviz3d")`: how to build 3d interactive plots of meshes as issued from {mgx2r}
## Example
The data in the example below were created with the package {mgx2r}, on the example dataset of {mgx2r}. This dataset is a timelapse recording of the development of a shoot apical meristem of the plant \emph{Arabidopsis thaliana} expressing a membrane marker. I took one 3D stack every 12h and have 5 timepoints in total. To know more about the example dataset of {mgx2r}, see `help.search("mgx2r-package")`.
```{r, eval=FALSE}
library(cellviz3d)
library(plotly)
```
```{r, eval=FALSE}
# Read data
myMesh <- readRDS(system.file("extdata",
"mgx/mesh_meristem_full_T0.rds",
package = "cellviz3d"))
myCellGraph <- readRDS(system.file("extdata",
"mgx/cellGraph_meristem_full_T0.rds",
package = "cellviz3d"))
```
`plotlyMesh()` creates a plotly graph of type mesh 3D, with custom colors and custom hover information for a single mesh. Below, the mesh is displayed with one color and one cell label per biological cell. Cell label is visible when hovering over the cell center.
```{r, eval=FALSE}
meshCellcenter <- myCellGraph$vertices[,c("label","x", "y", "z")]
plotlyMesh(meshExample = myMesh,
meshColors = myMesh$allColors$Col_label,
meshCellcenter = meshCellcenter) %>%
layout(scene = list(aspectmode = "data"))
```
```{r, echo=FALSE, out.width="80%"}
knitr::include_graphics("https://raw.githubusercontent.com/marionlouveaux/cellviz3d/master/inst/extdata/mgx/img/p1labels.png")
```
<img src="https://raw.githubusercontent.com/marionlouveaux/cellviz3d/master/inst/extdata/mgx/img/timeserie800ms.gif" width="75%" text-align="center"/>
For more examples, see the vignette of {cellviz3d} and {mgx2r}.
## Acknowledgements
Many thanks to [@friep](https://github.com/friep) for her help on the plotlySpots_all() function.
## Code of conduct
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.