-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·80 lines (64 loc) · 2.38 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
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
# Define variables
DATA=data
CODE=code
RESULTS=results
LOG=log
all: directories \
$(LOG)/lincs.R.Rout \
$(LOG)/ccle.R.Rout \
$(LOG)/expression_signatures.R.Rout \
$(LOG)/differential_expression.R.Rout \
$(LOG)/causal_networks.R.Rout \
$(LOG)/network_scoring.R.Rout \
$(LOG)/similarity.R.Rout \
$(LOG)/test_restults.out \
$(LOG)/database.R.Rout \
$(LOG)/test_database.out \
$(LOG)/database_report.txt
directories:
mkdir -p $(DATA)
mkdir -p $(RESULTS)
mkdir -p $(LOG)
@echo "Make the directories data/, results/ and log/."
$(LOG)/expression_signatures.R.Rout: $(CODE)/expression_signatures.R
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Download the gene expression data."
$(LOG)/ccle.R.Rout: $(CODE)/ccle.R \
$(LOG)/expression_signatures.R.Rout
@echo "Add metadata to expression signatures."
$(LOG)/lincs.R.Rout: $(CODE)/lincs.R
@echo "Download the LINCS dataset."
$(LOG)/chembl.R.Rout: $(CODE)/chembl.R
@echo "Download the CHEMBL dataset."
$(LOG)/differential_expression.R.Rout: $(CODE)/differential_expression.R \
$(LOG)/expression_signatures.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Perform differential expression analysis."
$(LOG)/causal_networks.R.Rout: $(CODE)/causal_networks.R
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Download and preprocess the causal networks."
$(LOG)/network_scoring.R.Rout: $(CODE)/network_scoring.R \
$(LOG)/causal_networks.R.Rout \
$(LOG)/differential_expression.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Score the networks."
$(LOG)/similarity.R.Rout: $(CODE)/similarity.R \
$(LOG)/differential_expression.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Calculate similarities."
$(LOG)/database.R.Rout: $(CODE)/database.R \
$(LOG)/network_scoring.R.Rout \
$(LOG)/similarity.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Build the database."
$(LOG)/test_restults.out: tests/test-restults.R \
$(LOG)/network_scoring.R.Rout \
$(LOG)/differential_expression.R.Rout
Rscript -e "testthat::test_file('tests/test-restults.R')" > $(LOG)/test_restults.out 2>&1
$(LOG)/test_database.out: tests/test-database.R \
$(RESULTS)/LINPS.sqlite
Rscript -e "testthat::test_file('tests/test-database.R')" > $(LOG)/test_database.out 2>&1
$(LOG)/database_report.txt: $(CODE)/database_report.sh \
$(RESULTS)/LINPS.sqlite
bash $(CODE)/database_report.sh > $(LOG)/database_report.txt