-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
94 lines (70 loc) · 3.44 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.PHONY: all
all: Paper/paper.pdf \
Analysis/siusims.rda \
## Using renv for libraries now although it is having trouble on the cluster with seeing
## libraries installed via mamba install in the cache and keeps wanting to reinstall everything from source.
## Paper tasks
Paper/paper.pdf: Paper/paper.tex \
figures/sim_fwer_weak.tex \
cd Paper && latexmk -pdf paper.tex
## Figures and Tables and Result Interpretations
figures/sim_fwer_weak.tex: figures/simsres_plotting.rda \
Analysis/simsres.rda \
figures/fwer_plot.R
Rscript figures/fwer_plot.R
figures/overalloutcome.pdf: figures/descfakeoutcome.R \
Data/mtwrkdat.rda Data/blocks.rda
R --file=figures/descfakeoutcome.R
figures/descfakeoutcomes.pdf: figures/overalloutcome.pdf
touch figures/descfakeoutcomes.pdf
## Analysis tasks
Analysis/simparms.rda: Analysis/simparms.R
R --file=Analysis/simparms.R
#### The long simulations are running using Analysis/siusims.R
## it creates many CSV files, so it is hard to make a Makefile target for it.
## Make the not_done_idx file out of all of the CSVS
Analysis/not_done_idx.rda: Analysis/what_has_been_done.R
R --file=Analysis/what_has_been_done.R
## Collect the CSV files together into an R dataset
## Use python for the merging of csv files mostly because I want to learn more about python
## the python environment exists for the libraries/packages needed by concat_clean.py
Analysis/merged_results.csv: Analysis/concat_clean.py
source .venv/bin/activate && python Analysis/concat_clean.py
Analysis/simsres.rda: Analysis/merged_results.csv Analysis/make_rda.R
R --file=Analysis/make_rda.R
figures/simsres_plotting.rda: figures/results_data_for_plots.R \
Analysis/simsres.rda
R --file=figures/results_data_for_plots.R
### this next might take too long. Basically adding it here to help us understand relationships among files.
Analysis/p_sims_res_equal_nb_2024.rda: Analysis/siusims.R \
Analysis/simparms.rda \
Data/equal_blocksize_data.rda
R --file=Analysis/siusims.R
## Data tasks
### Create the simulated base data one with equal block sizes and the other not equal block sizes
Data/make_test_data.done: Data/make_test_data.R
R --file=Data/make_test_data.R
Data/idat_equal_nb.rda: Data/make_test_data.done
Data/idat_not_equal_nb.rda: Data/make_test_data.done
Data/bdat_equal_nb.rda: Data/make_test_data.done
Data/bdat_not_equal_nb.rda: Data/make_test_data.done
Data/blocks_sampled.rda: Data/make_test_data.done \
Data/make_block_lists.R
R --file=Data/make_block_lists.R
Data/block_datasets.done: Data/make_block_datasets.R \
Data/blocks_sampled.rda \
Data/make_test_data.done
R --file=Data/make_block_datasets.R
Data/unequal_blocksize_data.rda: Data/block_datasets.done
Data/equal_blocksize_data.rda: Data/block_datasets.done
## Visualize the Makefile
makefile.plots: makefile.png makefile.pdf
## see also https://stackoverflow.com/questions/14784405/how-to-set-the-output-size-in-graphviz-for-the-dot-format/20536144
## dot -Tpdf -Gsize=9,15\! -Gdpi=100 -ofoo.pdf foo.gv
## A graph of the makefile
makefile.png: Makefile make_p_to_json.py json_to_dot.py
make -qp | python3 make_p_to_json.py | python3 json_to_dot.py | dot -Tpng >| makefile.png
makefile.pdf: Makefile make_p_to_json.py json_to_dot.py
make -qp | python3 make_p_to_json.py | python3 json_to_dot.py | dot -Tpdf >| makefile.pdf
## see also https://stackoverflow.com/questions/14784405/how-to-set-the-output-size-in-graphviz-for-the-dot-format/20536144
## dot -Tpng -Gsize=9,15\! -Gdpi=100 -ofoo.png foo.gv