README.md 2.68 KB
Newer Older
dmattek's avatar
dmattek committed
1 2
# Time-course analysis web-app

dmattek's avatar
dmattek committed
3
## Running the app from the server
dmattek's avatar
dmattek committed
4
The app can be accessed here:
dmattek's avatar
dmattek committed
5
http://pertzlab.unibe.ch:3838/shiny-timecourse-inspector/
dmattek's avatar
dmattek committed
6

dmattek's avatar
dmattek committed
7
## Running the app locally
dmattek's avatar
dmattek committed
8 9 10 11 12 13 14 15 16
Alternatively, after downloading the code, the app can be run within RStudio. Open `server.R` or `ui.R` file, then click "Run App" button with green triangle in the upper right corner of the window with code open.

Following packages need to be installed in order to run the app locally:

* shiny
* shinyjs
* data.table
* ggplot2
* gplots
dmattek's avatar
dmattek committed
17
* scales
dmattek's avatar
dmattek committed
18 19 20 21 22
* plotly
* d3heatmap
* dendextend
* RColorBrewer
* sparcl
dmattek's avatar
dmattek committed
23 24
* imputeTS
* dtw
25 26 27 28
* DT
* MASS
* robust
* pracma
dmattek's avatar
dmattek committed
29 30 31

Install packages using `install.packages('name_of_the_package_from_the_list_above')` command in RStudio command line.

dmattek's avatar
dmattek committed
32 33
```
install.packages(c("shiny", "shinyjs", 
34
					"data.table", "DT",
dmattek's avatar
dmattek committed
35 36 37
					"ggplot2", "gplots", "plotly", "d3heatmap", "scales",
					"dendextend", "dendextend", "RColorBrewer",
					"sparcl", "dtw",
38 39
					"imputeTS",
					"MASS", "robust", "pracma")) 
dmattek's avatar
dmattek committed
40 41
```

42 43 44 45 46 47 48 49 50 51 52 53 54 55
**Additionally**, a time series analysis package need to be installed from [GitHub](https://github.com/dmattek/tca-package):

```
install_github("dmattek/tca-package")
```

The `install_github` function is available in *devtools* package:

```
install.packages("devtools")
library(devtools)
```


dmattek's avatar
dmattek committed
56 57
## Input file
The app recognises CSV (comma-separated values) files: data columns separated by a comma, floating point numbers using a dot (full-stop).
dmattek's avatar
dmattek committed
58 59 60 61

The data file has to be in a so called long format, where individual time-courses (tracks) are arranged one after another. Note a wide-format where individual tracks are arranged in neighbouring columns is NOT supported!

Sample few lines of the input file:
dmattek's avatar
dmattek committed
62 63 64 65 66 67
```
"Metadata_Series", "TrackObjects_Label", "Intensity_MeanIntensity_Ratio", "RealTime", "Stim_All_Ch", "Stim_All_S"
0, 2, 1149.00311105531, 0, "Ch01: FGF 250 ng/ml 60min pulse", "S00: FGF 250 ng/ml 60min pulse"
0, 3, 1160.43905280656, 0, "Ch01: FGF 250 ng/ml 60min pulse", "S00: FGF 250 ng/ml 60min pulse"
0, 4, 1303.06046656558, 0, "Ch01: FGF 250 ng/ml 60min pulse", "S00: FGF 250 ng/ml 60min pulse"
```
dmattek's avatar
dmattek committed
68 69 70 71 72 73 74 75 76

The first row should include column headers. Necessary columns include:

* Unique number of the field of view (FOV), here "Metadata_Series"
* Unique identifier of track ID within the FOV, here "TrackObjects_Label"
* Time point, here "RealTime"
* Measurement column (can be many columns), here "Intensity_MeanIntensity_Ratio"

Additionally, columns with condition names can be included. In the example above, "Stim_All_S" identifies condition per FOV, and "Stim_All_Ch" relates to a condition name within the well. These two columns are useful to group and plot time-courses in separate facets per FOV or per well.