-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME.Rmd
More file actions
52 lines (41 loc) · 1.54 KB
/
README.Rmd
File metadata and controls
52 lines (41 loc) · 1.54 KB
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
---
title: "cranium"
author: Ben Baumer
date: April 11, 2017
output:
md_document:
variant: markdown_github
---
An R package to quantify radial bridge images
## Installation
`cranium` depends on the `rhdf5` package for reading HDF5 files, but this package is not available on CRAN. You must install it from Bioconductor. To do this, you have to run the following code once:
```{r, eval=FALSE}
install.packages("BiocInstaller",
repos = "http://bioconductor.org/packages/3.4/bioc")
source("https://bioconductor.org/biocLite.R")
biocLite("rhdf5")
```
Then, you can install `cranium` from GitHub using the following commands:
```{r, eval=FALSE}
install.packages("devtools")
devtools::install_github("beanumber/cranium")
```
## Download sample data
To download sample data, You Too and WildType, you can run:
```{r}
youtoo <- download_youtoo_data("folder") #where folder is the location you want to store the You Too data
wildtype <- download_wildtype_data("folder") #where folder is the location you want to store the Wild Type data
youtoo[[1]] #first you too data sample
```
Once the above is ran, the files are saved in a list and in the folder you set, each data sample can be indivudually picked from list by indexing.
## Plot a 3D image of a brain
Now, you can simply point to a raw HDF5 file, and quickly render a 3D image of the data, along with our model of it.
```{r, eval=FALSE}
file <- "~/Data/barresi/AT_1_Probabilities.h5"
library(cranium)
library(tidyverse)
tidy_brain <- file %>%
read_h5() %>%
tidy()
plot3d(tidy_brain)
```