-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·76 lines (73 loc) · 2.42 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
#!/bin/bash
DATA=data
LOG=log
SCRIPTS=scripts
all: directories \
$(LOG)/clean_data.R.Rout \
$(LOG)/knocktf.R.Rout \
$(LOG)/hms.R.Rout \
$(LOG)/lincs.R.Rout \
$(LOG)/lincs_diff_expr.R.Rout \
$(LOG)/diff_expr_groups.R.Rout \
$(LOG)/npa_model.R.Rout \
$(LOG)/scoring.R.Rout \
$(LOG)/concordance.R.Rout \
$(LOG)/coherence.R.Rout \
manuscript
directories:
mkdir -p $(DATA)
mkdir -p $(LOG)
@echo "Make two directories data/ and log/."
$(LOG)/clean_data.R.Rout: $(SCRIPTS)/clean_data.R \
$(DATA)/md.csv
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Download and clean gene expression data."
$(LOG)/diff_expr_groups.R.Rout: $(SCRIPTS)/diff_expr_groups.R \
$(DATA)/msg_kd_eset.rds \
$(DATA)/msg_list.txt
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Perform differential expression analysis."
$(LOG)/knocktf.R.Rout: $(SCRIPTS)/knocktf.R
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Download KnockTF data."
$(LOG)/hms.R.Rout: $(SCRIPTS)/hms.R \
$(DATA)/dataset_20268_20210412113444.csv \
$(DATA)/dataset_20269_20210412114601.csv
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Download HMS data."
$(LOG)/lincs.R.Rout: $(SCRIPTS)/lincs.R
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Download LINCS data."
$(LOG)/lincs_diff_expr.R.Rout: $(SCRIPTS)/lincs_diff_expr.R \
$(DATA)/lincs_trt_cp.rds
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Perfom differential expression on LINCS data."
$(LOG)/npa_model.R.Rout: $(SCRIPTS)/npa_model.R \
$(DATA)/combined_interactions.csv \
$(DATA)/diff_expr_groups.rds \
$(DATA)/knock_tf_subset.tsv
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Format the network for NPAModels"
$(LOG)/scoring.R.Rout: $(SCRIPTS)/scoring.R \
$(DATA)/lincs_trt_cp_deg.rds \
$(DATA)/full_graph.rds \
$(DATA)/lincs_trt_cp_deg.tsv \
$(LOG)/npa_model.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Score the network perturbations."
$(LOG)/concordance.R.Rout: $(SCRIPTS)/concordance.R \
$(DATA)/combined_interactions.csv \
$(LOG)/npa_model.R.Rout \
$(LOG)/scoring.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Calculate network concordance."
$(LOG)/coherence.R.Rout: $(SCRIPTS)/coherence.R \
$(DATA)/combined_interactions.csv \
$(LOG)/npa_model.R.Rout \
$(LOG)/scoring.R.Rout
R CMD BATCH --vanilla $< $(LOG)/$(<F).Rout
@echo "Calculate network coherence."
manuscript: manuscript.Rmd \
$(LOG)/npa_model.R.Rout \
$(LOG)/scoring.R.Rout
Rscript -e "knitr::knit('manuscript.Rmd')"