forked from FredHutch/Oncoscape
/
makefile
68 lines (57 loc) · 2.24 KB
/
makefile
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
default: install test
####
# INSTALL
#>make
# 1. installs all dependencies, data, and analysis packages
#
# Install R packages using biocLite, including:
# 'pls', 'limma', 'org.Hs.eg.db', 'BiocInstaller', 'AnnotationDbi', 'BiocGenerics'
# Installs analysis package: PCA, PLSR
# Installs data packages: PatientHistory, SttrDataPackage, DEMOdz, TCGAgbm, TCGAlgg, TCGAbrain, DGI
# Install Oncoscape
#
# 2. Tests that datapackages are properly installed and accessible
#
# Tests Oncoscape unit tests
# Runs test_OncoDev14.R: tests json Operations, load data packages, expression matrix, patientHistoryTable
# Runs test_UserDataStore.R: add and remove data from DataStore
#
# EXECUTE
#>make oncoApp7777
# 1. Kills potential running process then starts Oncoscape R server using DEMOdz & TCGAgbm data on port 7777
install:
. ./installRpackages_global.sh
installLocal:
mkdir -p $(R_LIBS)
. ./installRpackages_local.sh
test:
(cd dataPackages/; make test)
(cd analysisPackages/; make test)
(cd Oncoscape/inst/unitTests; make test)
# launches Oncoscape on the provided port then tests modules using websocket requests
testWS:
python testAllWebsocketOperations.py localhost:7777 | tee testAllWebsocketOperations_7777.log &
autoTest:
(cd analysisPackages/; make autoTest)
(cd Oncoscape/inst/unitTests; make autoTest)
cleanupTests:
- kill `ps aux | grep runPLSRTestWebSocketServer.R | grep -v grep | awk '{print $$2}'`
- kill `ps aux | grep runPCATestWebSocketServer.R | grep -v grep | awk '{print $$2}'`
- kill `ps aux | grep runWsTestOnco.R | grep -v grep | awk '{print $$2}'`
# installOncoscape
####
installOncoscape:
(cd Oncoscape; R --vanilla CMD INSTALL --no-test-load --no-lock .; R CMD BUILD .)
installOncoscapeLocal:
(cd Oncoscape; R -l $(R_LIBS) --vanilla CMD INSTALL --no-test-load --no-lock .; sudo R CMD BUILD .)
# oncoApp7777: kills then launches R server: public Brain datasets on port 7777
####
# kills current process and starts new one
# runs Oncoscape on port 7777 with DEMOdz & TCGAgbm
# using all (9) current tabs
oncoAppLocal7777:
(cd Oncoscape/inst/scripts/apps/oncoscape/; make runLocal;)
oncoApp7777:
(cd Oncoscape/inst/scripts/apps/oncoscape/; make run;)
oncoDocker:
(cd Oncoscape/inst/scripts/apps/oncoscape/; make runDocker;)