This is a Shiny app developed for PMET.
.
├── conf * # configure for shiny server and nginx
├── data
├── dockerfiles
├── PMETdev
├── indexing
├── R
│ ├── app.R
│ ├── global.R
│ ├── module
│ ├── server
│ ├── ui
│ └── utils
├── result
├── www
├── 01_deploy_via_Docker.sh
├── 01_deploy_via_singularity.sh * # Recommended installation method
├── app.R * # Shiny app
├── docker-compose.yml
├── PMET-Shiny-App.Rproj
└── readme.md
Before officially deploying the PMET-Shiny-app, as a deployment personnel, you need to prepare an SMTP server to send emails to users containing links where they can download the results. When running the deployment script, you will need to provide the relevant information according to the script requirements.
bash 01_deploy_via_singularity.sh
bash 01_deploy_via_Docker.sh
-
Install
Shiny Server
andNginx
[details] -
git clone
in the folder of Shiny Server (default:/srv/shiny-server
) or git clone anywhere and then create a link under/srv/shiny-server
as shown below: -
Run
01_deploy_via_bash.sh
``` bash archive/01_deploy_via_bash.sh ```
If not necessary, there is no need to read the following content.
Given that the PMET indexing calculation takes a very long time, we have already performed pre-calculation for some plants and several common plant transcription factor databases.
The data can be accessed by running the script deploy_one_bash.sh
from Homotypic motifs from 5 databases in the promoters of 21 plant species.
bash deploy_one_bash.sh
```shell
# file tree
data/indexing
|-- Arabidopsis_thaliana # species
│ |-- CIS-BP2 # motif database
│ |-- Franco-Zorrilla_et_al_2014 # motif database
│ |-- Jaspar_plants_non_redundant_2022 # motif database
│ |-- PlantTFDB # motif database
│ |-- Plant_Cistrome_DB # motif database
│ `-- universe.txt # complete gene list
|-- Brachypodium_distachyon
|-- Brassica_napus
|-- Glycine_max
|-- Hordeum_vulgare
|-- Hordeum_vulgare_Morex_V3
|-- Hordeum_vulgare_R1
|-- Hordeum_vulgare_goldenpromise
|-- Hordeum_vulgare_v082214v1
|-- Medicago_truncatula
|-- Oryza_sativa_indica_9311
|-- Oryza_sativa_indica_IR8
|-- Oryza_sativa_indica_MH63
|-- Oryza_sativa_indica_ZS97
|-- Oryza_sativa_japonica_Ensembl
|-- Oryza_sativa_japonica_Kitaake
|-- Oryza_sativa_japonica_Nipponbare
|-- Oryza_sativa_japonica_V7.1
|-- Solanum_lycopersicum
|-- Solanum_tuberosum
|-- Triticum_aestivum
`-- Zea_mays
In the future, if there are more plants or new databases to be added to the shiny app, we just need to copy the new indexing results to the indexing directory. the PMET shiny app will automatically recognize the new additions without the need to change the code.
There are a few tools that need to be compiled before deploying the Shiny app, and we provide a script that does all the work. If you don't really want to know the details, you can just run the following script.
cd PMETdev
chmod a+x binary_compile.sh
bash binary_compile.sh
After compilation, the executable will be saved in the PMETdev/scripts
directory for the Shiny app to call.
5.1 Shiny-server and nginx install
Please follow Shiny Server Deployment for more details.
5.2 Shiny config
Once Shiny Server is installed, you can access the Shiny Server welcome page by visiting your local IP address followed by port 3838 (127.0.0.1:3838 in your PC, if not in a server with a static IP ).
The configuration file for Shiny Server is located at /etc/shiny-server/shiny-server.conf
. Various parameters can be modified in this file. By default, newly created Shiny app projects should be stored in /srv/shiny-server
, allowing Shiny Server to access and render them as web pages.
You can either directly copy the pmet
folder to /srv/shiny-server
or create a link to it in that directory.
ln -s /home/shiny/pmet_nginx /srv/shiny-server
5.3 nginx config
Add the following in the end of /etc/nginx/sites-enabled/default
# vim /etc/nginx/sites-enabled/default
server {
listen 127.0.0.1:84;
server_name 127.0.0.1;
location /result {
alias /home/shiny/pmet_nginx/result;
}
}