-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
137 lines (107 loc) · 4.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
help:
@echo "Main targets:"
@echo " test_functions - perform function tests."
@echo " test_tools - perform tool tests."
@echo " test_tools_db - perform DB tool tests."
@echo " test_pipeline_a - perform DNA amplicon pipeline test."
@echo " test_pipeline_x - perform DNA shotgun pipeline test."
@echo " test_pipeline_t - perform DNA trio pipeline test."
@echo " test_pipeline_m - perform DNA multi-sample pipeline test."
@echo " test_pipeline_s - perform DNA somatic pipeline test."
@echo " test_pipeline_r - perform RNA pipeline test."
@echo " test_pipeline_c - perform cfDNA pipeline test."
@echo " test_pipeline_tl - perform DNA longread trio pipeline test."
@echo " test_pipeline_ml - perform DNA longread multi-sample pipeline test."
@echo " test_all - perform all tests in parallel (functions, tools, pipelines)."
@echo " test_all_status - shows the output summary of 'test_all'."
@echo ""
@echo "Auxilary targets:"
@echo " find_missing_tests - Checks for tools that do not have a test."
@echo " todos - Checks for todos in the code"
@echo " pull - Pull latest version from GitHub"
pull:
git pull --recurse-submodules
git describe --tags > megSAP_tag.txt
git status
test_functions: dummy
@cd test && find . -name "test_*.php" | sort | xargs -l1 php | egrep "^(FINISHED|FAILED)"
test_tools: dummy
@cd test && find . -name "tool_test_*.php" | sort | xargs -l1 php | egrep "^(FINISHED|FAILED)"
test_tools_primer: dummy
@cd test && find . -name "tool_test_*.php" | xargs grep -l "/Primer/" | sort | xargs -l1 php | egrep "^(FINISHED|FAILED)"
test_tools_ngs: dummy
@cd test && find . -name "tool_test_*.php" | xargs grep -l "/NGS/" | sort | xargs -l1 php | egrep "^(FINISHED|FAILED)"
test_tools_tools: dummy
@cd test && find . -name "tool_test_*.php" | xargs grep -l "/Tools/" | sort | xargs -l1 php | egrep "^(FINISHED|FAILED)"
test_tools_db:
@cd test && find . -name "tool_test_db*.php" | sort | xargs -l1 php | egrep "^(FINISHED|FAILED)"
test_pipeline_a: dummy
@cd test/data_amplicon && make all
test_pipeline_x: dummy
@cd test/data_chrx && make all
test_pipeline_s: dummy
@cd test/data_somatic && make all
test_pipeline_t: dummy
@cd test/data_trio && make all
test_pipeline_m: dummy
@cd test/data_multi && make all
test_pipeline_r: dummy
@cd test/data_rna && make all
test_pipeline_c: dummy
@cd test/data_cfdna && make all
test_pipeline_l: dummy
@cd test/data_longread && make all
test_pipeline_tl: dummy
@cd test/data_trio_longread && make all
test_pipeline_ml: dummy
@cd test/data_multi_longread && make all
test_all: dummy
(cd test && find . -name "test_*.php" | sort | xargs -l1 php && echo "DONE") > f.log 2>&1
(cd test && find . -name "tool_test_*.php" | sort | xargs -l1 php && echo "DONE") > t.log 2>&1 &
make test_pipeline_a > p_a.log 2>&1 &
make test_pipeline_x > p_x.log 2>&1 &
make test_pipeline_s > p_s.log 2>&1 &
make test_pipeline_t > p_t.log 2>&1 &
make test_pipeline_m > p_m.log 2>&1 &
make test_pipeline_r > p_r.log 2>&1 &
make test_pipeline_c > p_c.log 2>&1 &
make test_pipeline_l > p_l.log 2>&1 &
make test_pipeline_tl > p_tl.log 2>&1 &
make test_pipeline_ml > p_ml.log 2>&1 &
test_all_status:
@clear
@tail -v -n3 *.log
@echo ""
@echo "### WARNINGS ###"
@egrep -a -i "WARNING" *.log || :
@echo ""
@echo "### ERRORS ###"
@egrep -a -i "ERROR|FAILED" *.log | grep -v "Medelian errors:" || :
test_clear:
@cd test/data_amplicon && make clean
@cd test/data_chrx && make clean
@cd test/data_somatic && make clear
@cd test/data_trio && make clear
@cd test/data_multi && make clear
@cd test/data_rna && make clean
@cd test/data_cfdna && make clean
@cd test/data_longread && make clean
@cd test/data_trio_longread && make clean
@cd test/data_multi_longread && make clean
test_clear_check:
git status --ignored | grep "test/data_" | grep -v data_out
find_missing_tests: dummy
php src/Tools/find_missing_tests.php
find_unused_tools: dummy
php src/Tools/find_unused_tools.php -ngsbits ../ngs-bits/ -megsap . > unused_tools.txt
todos:
find . -name "*.php" | xargs grep -i "//todo"
find_php_warnings_in_tests:
find test/ -type f -and -name "*.log" -or -type f -and -name "*_output" | xargs egrep -i "PHP (warning|notice)" || true
swap_settings:
mv settings.ini settings.ini.swap
mv settings_nightly.ini settings.ini
mv settings.ini.swap settings_nightly.ini
clean_ignored:
git clean -Xn | cut -f3 -d' ' | egrep -v "settings.ini|megSAP_tag.txt" | xargs rm
dummy: