Skip to content

Commit 0e2d8c0

Browse files
committed
Merge branch 'develop'
2 parents 2f81a3d + a108d14 commit 0e2d8c0

73 files changed

Lines changed: 26234 additions & 29085 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
^renv$
2+
^renv\.lock$
13
^.*\.Rproj$
24
^\.Rproj\.user$

.Rprofile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
if (file.exists("renv/activate.R")) {
2+
source("renv/activate.R")
3+
if (!"startup" %in% installed.packages()) {renv::install("startup")}
4+
if (!"crayon" %in% installed.packages()) {renv::install("crayon")}
5+
startup::startup()
6+
7+
cat(
8+
crayon::green("================================================================="),
9+
crayon::green("NOTE: run 'renv::restore()' to install packages"),
10+
crayon::green(" run 'shiny::runApp()' to run the app locally"),
11+
crayon::green(" run 'rsconnect::deployApp()' to deploy to shinyapps.io"),
12+
crayon::green("See README.md for more.\n"),
13+
fill = TRUE
14+
)
15+
}

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
.DS_Store
2+
.httr-oauth
13
.Rhistory
2-
*.Rproj
34
.Rproj.user
4-
.httr-oauth
55
*~
6-
.DS_Store
7-
rsconnect
6+
data/io*
7+
rsconnect/

DEPENDENCIES

Lines changed: 0 additions & 127 deletions
This file was deleted.

README.md

Lines changed: 119 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,152 @@
11
# Shiny-iAtlas
22

3-
Shiny-iAtlas is an interactive web portal that provides multiple analysis modules to visualize and explore immune response characterizations across cancer types. The app is hosted on shinyapps.io at https://isb-cgc.shinyapps.io/shiny-iatlas/ and can also be accessed via the main CRI iAtlas page at http://www.cri-iatlas.org/.
3+
Shiny-iAtlas is an interactive web portal that provides multiple analysis modules to visualize and explore immune response characterizations across cancer types. The app is hosted on shinyapps.io at [https://isb-cgc.shinyapps.io/shiny-iatlas/](https://isb-cgc.shinyapps.io/shiny-iatlas/) and can also be accessed via the main CRI iAtlas page at [http://www.cri-iatlas.org/](http://www.cri-iatlas.org/).
44

55
The portal is built entirely in **R** and **Shiny** using the **RStudio** development environment. Layout and interactivity within the portal are achieved by heavy use of the following packages:
66

7-
+ **`shinydashboard`**
8-
+ **`plotly`**
9-
+ **`crosstalk`**
7+
- [shinydashboard](https://rstudio.github.io/shinydashboard/)
8+
- [plotly](https://plot.ly/r/)
9+
- [crosstalk](https://rstudio.github.io/crosstalk/)
1010

11-
Violin plots are not available in the current version of plotly in CRAN; need to use development version from GitHub (e.g., 4.7.1.9000). To install the development version:
11+
## Install
1212

13-
```R
14-
devtools::install_github("ropensci/plotly")
15-
```
13+
### Requirements
1614

17-
Other data transformation and formatting operations, as well as many other general application tasks, are supported by a variety of packages in the **`tidyverse`**. For a full list of dependencies (as generated by `rsconnect::appDependencies()`), see the [`DEPENDENCIES`](https://github.com/CRI-iAtlas/shiny-iatlas/blob/master/DEPENDENCIES) file.
15+
- R: https://www.r-project.org/ - v3.6.2
1816

19-
## Data
17+
- RStudio: https://rstudio.com/products/rstudio/download
2018

21-
Input data for the Shiny-iAtlas portal were accessed from multiple remote sources, including **Synapse**, the **ISB Cancer Genomics Cloud**, and **Google Drive**. For convenience, we have created locally cached versions of dataframe objects as **`feather`** files:
19+
- lib cairo: https://www.cairographics.org/ (only required for iAtlas client)
2220

23-
+ `fmx_df.feather`
24-
+ `feature_df.feather`
25-
+ `feature_method_df.feather`
26-
+ `im_direct_relationships.feather`
27-
+ `im_potential_factors.feather`
28-
+ `im_expr_df.feather`
29-
+ `sample_group_df.feather`
21+
- gfortran (libgfortran): usually installed with gcc
3022

31-
## Methods
23+
### MacOS Install instructions
3224

33-
While many of the results presented in tables and plots are taken directly from IRWG data (including the main **feature matrix** and various feature and group annotations), we compute some values internally. Unless otherwise noted, the following methods/tools were used to compute summary statistics:
25+
Install brew: https://brew.sh/
26+
27+
Then:
28+
29+
- brew install R
30+
- brew install cairo
31+
- download and install RStudio: https://rstudio.com/products/rstudio/download
32+
33+
### Initialize R Packages, Database and run App
34+
35+
To run the app locally:
36+
37+
1. Clone this repository
38+
39+
1. Open `shiny-iatlas.Rproj`
40+
41+
1. Install packages. In the RStudio console, run:
42+
43+
```R
44+
renv::restore()
45+
```
46+
47+
This may take some time to complete - get something nice to drink :)
3448

35-
#### Correlation — Spearman's rank-order correlation:
49+
1. Start the app by running:
50+
51+
```R
52+
shiny::runApp()
53+
```
54+
55+
## Development
56+
57+
When adding any new dependencies to the application, they may be added using (where "useful_package" is the name of the package to add):
3658

3759
```R
38-
stats::cor(x, y, method = "spearman", use = "pairwise.complete.obs")
60+
renv::install("useful_package")
3961
```
4062

41-
#### Concordance Index (CI):
63+
see [https://rstudio.github.io/renv/reference/install.html](https://rstudio.github.io/renv/reference/install.html) for more details.
4264

43-
Concordance indexes for survival endpoints with respect to different immune readouts were computed using a custom package developed by Tai-Hsien Ou Yang at Columbia University. The **concordanceIndex** package includes a single synonymous function that can be used as follows:
65+
Once a new package is added, run:
4466

4567
```R
46-
concordanceIndex::concordanceIndex(predictions, observations)
68+
renv::snapshot()
4769
```
4870

49-
... where `predictions` and `observations` are numerical vectors of the same length.
71+
This will ensure the new package is added to the renv.lock file.
5072

51-
The **concordanceIndex** package can be installed from GitHub using *devtools*:
73+
To remove an installed package, run (where "useful_package" is the name of the package to remove):
5274

5375
```R
54-
devtools::install_github("th86/concordanceIndex")
76+
renv::remove("no_longer_useful_package")
5577
```
5678

79+
For more on package management with renv, please see [https://rstudio.github.io/renv/articles/renv.html](https://rstudio.github.io/renv/articles/renv.html)
5780

58-
## Local Shiny-iAtlas Session
81+
## Deployment
5982

60-
To run the app locally, clone this repository and use the following command in the `shiny-iatlas` directory:
83+
The first time you deploy, go through the Deployment-Setup instructions below. Afterwards, you can just deploy as needed.
6184

85+
### Deployment Setup (First-Time-Only)
86+
87+
You'll need to set up your credentials for shinyapps.io. You can get your codes from:
88+
89+
- https://www.shinyapps.io/admin/#/tokens
90+
91+
Paste and evaluate your tokens in the RStudio console. They look like this:
92+
93+
```R
94+
# shinyapps.io example credentials
95+
rsconnect::setAccountInfo(
96+
name='shiny-iatlas',
97+
token='xxx',
98+
secret='yyy'
99+
)
62100
```
63-
shiny::runApp()
101+
102+
103+
### Deploy
104+
105+
```R
106+
rsconnect::deployApp()
107+
```
108+
109+
110+
## Data
111+
112+
Input data for the Shiny-iAtlas portal were accessed from multiple remote sources, including **Synapse**, the **ISB Cancer Genomics Cloud**, and **Google Drive**. For convenience, we have created locally cached versions of dataframe objects as **`feather`** files in the `data2` folder:
113+
114+
- `driver_mutations1.feather`
115+
- `driver_mutations2.feather`
116+
- `driver_mutations3.feather`
117+
- `driver_mutations4.feather`
118+
- `driver_mutations5.feather`
119+
- `driver_results1.feather`
120+
- `driver_results2.feather`
121+
- `feature_values_long.feather`
122+
- `features.feather`
123+
- `groups.feather`
124+
- `immunomodulator_expr.feather`
125+
- `immunomodulators.feather`
126+
- `io_target_expr1.feather`
127+
- `io_target_expr2.feather`
128+
- `io_target_expr3.feather`
129+
- `io_target_expr4.feather`
130+
- `io_targets.feather`
131+
- `til_image_links.feather`
132+
133+
## Methods
134+
135+
While many of the results presented in tables and plots are taken directly from IRWG data (including the main **feature matrix** and various feature and group annotations), we compute some values internally. Unless otherwise noted, the following methods/tools were used to compute summary statistics:
136+
137+
### Correlation — Spearman's rank-order correlation
138+
139+
```R
140+
stats::cor(x, y, method = "spearman", use = "pairwise.complete.obs")
64141
```
142+
143+
### Concordance Index (CI)
144+
145+
Concordance indexes for survival endpoints with respect to different immune readouts were computed using a custom package developed by Tai-Hsien Ou Yang at Columbia University. The **concordanceIndex** package includes a single synonymous function that can be used as follows:
146+
147+
```R
148+
concordanceIndex::concordanceIndex(predictions, observations)
149+
```
150+
151+
... where `predictions` and `observations` are numerical vectors of the same length.
152+

0 commit comments

Comments
 (0)